All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/16] bitbake/runqueue.py: Fix stamp handling for noexec tasks
  2010-11-28 22:07 [PATCH 00/16] Poky core tweaks Richard Purdie
@ 2010-11-28 12:07 ` Richard Purdie
  2010-11-28 12:41 ` [PATCH 02/16] scripts/poky-env-internal/image-swab.bbclass: Remove OEROOT references Richard Purdie
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Richard Purdie @ 2010-11-28 12:07 UTC (permalink / raw)
  To: poky

This means the noexec messages are only shown once as the stamp files are now
correctly created.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
---
 bitbake/lib/bb/runqueue.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 85ecafc..d5c9565 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1223,7 +1223,7 @@ class RunQueueExecuteTasks(RunQueueExecute):
                                                                 self.rqdata.get_user_idstring(task)))
                 self.runq_running[task] = 1
                 self.stats.taskActive()
-                bb.build.make_stamp(task, self.rqdata.dataCache, fn)
+                bb.build.make_stamp(taskname, self.rqdata.dataCache, fn)
                 self.task_complete(task)
                 return True
 
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 02/16] scripts/poky-env-internal/image-swab.bbclass: Remove OEROOT references
  2010-11-28 22:07 [PATCH 00/16] Poky core tweaks Richard Purdie
  2010-11-28 12:07 ` [PATCH 01/16] bitbake/runqueue.py: Fix stamp handling for noexec tasks Richard Purdie
@ 2010-11-28 12:41 ` Richard Purdie
  2010-11-28 12:57 ` [PATCH 03/16] scripts/poky-env-internal: Remove unset variables Richard Purdie
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Richard Purdie @ 2010-11-28 12:41 UTC (permalink / raw)
  To: poky

OEROOT isn't used outside the init script so stop exporting it into the environment
where it can "corrupt" sstate packages.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
---
 meta/classes/image-swab.bbclass |    2 +-
 scripts/poky-env-internal       |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/classes/image-swab.bbclass b/meta/classes/image-swab.bbclass
index 93918bf..554867b 100644
--- a/meta/classes/image-swab.bbclass
+++ b/meta/classes/image-swab.bbclass
@@ -74,7 +74,7 @@ do_generate_swabber_report () {
 
   if [ "$(ls -A ${HOST_DATA})" ]; then
     echo "Generating swabber report"
-    swabber -d ${HOST_DATA} -l ${SWABBER_LOGS} -o ${SWABBER_REPORT}/report-${REPORTSTAMP}.txt -r ${SWABBER_REPORT}/extra_report-${REPORTSTAMP}.txt -c all -p ${TOPDIR} ${OEROOT} /tmp /dev /proc /usr/lib/python2.6 /usr/local/lib/python2.6 /usr/lib/pymodules /etc/ld.so.cache
+    swabber -d ${HOST_DATA} -l ${SWABBER_LOGS} -o ${SWABBER_REPORT}/report-${REPORTSTAMP}.txt -r ${SWABBER_REPORT}/extra_report-${REPORTSTAMP}.txt -c all -p ${TOPDIR} ${POKYBASE} /tmp /dev /proc /usr/lib/python2.6 /usr/local/lib/python2.6 /usr/lib/pymodules /etc/ld.so.cache
   else
     echo "No host data, cannot generate swabber report."
   fi
diff --git a/scripts/poky-env-internal b/scripts/poky-env-internal
index ae26cab..756d18c 100755
--- a/scripts/poky-env-internal
+++ b/scripts/poky-env-internal
@@ -99,7 +99,7 @@ fi
 unset POKYLOCALCONF
 unset POKYLAYERCONF
 
-export OEROOT BUILDDIR
+export BUILDDIR
 
 # Kill off the TERMINFO variable, as glibc will grab its contents in its 'make
 # install' if set
@@ -107,7 +107,7 @@ unset TERMINFO
 # kill this so we don't link non-arm libraries
 unset LD_LIBRARY_PATH
 # Don't export TARGET_ARCH - it *will* cause build failures
-export PATH LD_LIBRARY_PATH OEROOT
+export PATH LD_LIBRARY_PATH
 # Stop multi byte characters breaking the patcher stuff - This is for Redhat / Fedora people really
 export LANG=C
 # Kill PYTHONPATH as otherwise the Python specified there will conflict with
@@ -132,4 +132,4 @@ You can also run generated qemu images with a command like 'poky-qemu qemux86'
 
 EOM
 
-export BB_ENV_EXTRAWHITE="MACHINE DISTRO POKYMODE POKYLIBC OEROOT http_proxy ftp_proxy https_proxy all_proxy ALL_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY SDKMACHINE BB_NUMBER_THREADS GIT_PROXY_COMMAND"
+export BB_ENV_EXTRAWHITE="MACHINE DISTRO POKYMODE POKYLIBC http_proxy ftp_proxy https_proxy all_proxy ALL_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY SDKMACHINE BB_NUMBER_THREADS GIT_PROXY_COMMAND"
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 03/16] scripts/poky-env-internal: Remove unset variables
  2010-11-28 22:07 [PATCH 00/16] Poky core tweaks Richard Purdie
  2010-11-28 12:07 ` [PATCH 01/16] bitbake/runqueue.py: Fix stamp handling for noexec tasks Richard Purdie
  2010-11-28 12:41 ` [PATCH 02/16] scripts/poky-env-internal/image-swab.bbclass: Remove OEROOT references Richard Purdie
@ 2010-11-28 12:57 ` Richard Purdie
  2010-11-28 13:11 ` [PATCH 04/16] scripts/poky-env-internal: Further cleanups Richard Purdie
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Richard Purdie @ 2010-11-28 12:57 UTC (permalink / raw)
  To: poky

These variables are not on any bitbake environment whitelist so will never make it into
the environment. This is legacy code which is not required any more so remove it.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
---
 scripts/poky-env-internal |   10 ----------
 1 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/scripts/poky-env-internal b/scripts/poky-env-internal
index 756d18c..6bdb8df 100755
--- a/scripts/poky-env-internal
+++ b/scripts/poky-env-internal
@@ -101,20 +101,10 @@ unset POKYLAYERCONF
 
 export BUILDDIR
 
-# Kill off the TERMINFO variable, as glibc will grab its contents in its 'make
-# install' if set
-unset TERMINFO
-# kill this so we don't link non-arm libraries
-unset LD_LIBRARY_PATH
 # Don't export TARGET_ARCH - it *will* cause build failures
 export PATH LD_LIBRARY_PATH
 # Stop multi byte characters breaking the patcher stuff - This is for Redhat / Fedora people really
 export LANG=C
-# Kill PYTHONPATH as otherwise the Python specified there will conflict with
-# python-native.
-unset PYTHONPATH
-# Don't allow custom GConf schema paths to get into the system
-unset GCONF_SCHEMA_INSTALL_SOURCE
 
 cat <<EOM
 
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 04/16] scripts/poky-env-internal: Further cleanups
  2010-11-28 22:07 [PATCH 00/16] Poky core tweaks Richard Purdie
                   ` (2 preceding siblings ...)
  2010-11-28 12:57 ` [PATCH 03/16] scripts/poky-env-internal: Remove unset variables Richard Purdie
@ 2010-11-28 13:11 ` Richard Purdie
  2010-11-28 13:14 ` [PATCH 05/16] scripts: Remove obsolete stage-manager scripts Richard Purdie
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Richard Purdie @ 2010-11-28 13:11 UTC (permalink / raw)
  To: poky

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
---
 scripts/poky-env-internal |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/scripts/poky-env-internal b/scripts/poky-env-internal
index 6bdb8df..5b206ed 100755
--- a/scripts/poky-env-internal
+++ b/scripts/poky-env-internal
@@ -23,11 +23,11 @@ SCRIPTPATH=`readlink -f "$BASH_SOURCE"`
 OEROOT="`dirname $SCRIPTPATH`/../"
 
 if [ "x$BDIR" = "x" ]; then
-	  if [ "x$1" = "x" ]; then
+    if [ "x$1" = "x" ]; then
         BDIR="build"
-	  else
-		    BDIR=`readlink -f "$1"`
-	  fi
+    else
+        BDIR=`readlink -f "$1"`
+    fi
 fi
 if [[ "$BDIR" = /* ]] ; then
     BUILDDIR="$BDIR"
@@ -98,13 +98,15 @@ fi
 # Prevent disturbing a new GIT clone in same console
 unset POKYLOCALCONF
 unset POKYLAYERCONF
+unset BITBAKEDIR
+unset OEROOT
 
+# Used by the poky-qemu script
 export BUILDDIR
-
-# Don't export TARGET_ARCH - it *will* cause build failures
-export PATH LD_LIBRARY_PATH
+export PATH
 # Stop multi byte characters breaking the patcher stuff - This is for Redhat / Fedora people really
 export LANG=C
+export BB_ENV_EXTRAWHITE="MACHINE DISTRO POKYMODE POKYLIBC http_proxy ftp_proxy https_proxy all_proxy ALL_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY SDKMACHINE BB_NUMBER_THREADS GIT_PROXY_COMMAND"
 
 cat <<EOM
 
@@ -122,4 +124,3 @@ You can also run generated qemu images with a command like 'poky-qemu qemux86'
 
 EOM
 
-export BB_ENV_EXTRAWHITE="MACHINE DISTRO POKYMODE POKYLIBC http_proxy ftp_proxy https_proxy all_proxy ALL_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY SDKMACHINE BB_NUMBER_THREADS GIT_PROXY_COMMAND"
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 05/16] scripts: Remove obsolete stage-manager scripts
  2010-11-28 22:07 [PATCH 00/16] Poky core tweaks Richard Purdie
                   ` (3 preceding siblings ...)
  2010-11-28 13:11 ` [PATCH 04/16] scripts/poky-env-internal: Further cleanups Richard Purdie
@ 2010-11-28 13:14 ` Richard Purdie
  2010-11-28 14:10 ` [PATCH 06/16] curl: Fix gnutls option (append ordering was incorrect) Richard Purdie
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Richard Purdie @ 2010-11-28 13:14 UTC (permalink / raw)
  To: poky

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
---
 scripts/stage-manager            |  156 -----
 scripts/stage-manager-ipkg       | 1186 --------------------------------------
 scripts/stage-manager-ipkg-build |  246 --------
 3 files changed, 0 insertions(+), 1588 deletions(-)
 delete mode 100755 scripts/stage-manager
 delete mode 100755 scripts/stage-manager-ipkg
 delete mode 100755 scripts/stage-manager-ipkg-build

diff --git a/scripts/stage-manager b/scripts/stage-manager
deleted file mode 100755
index 536d1af..0000000
--- a/scripts/stage-manager
+++ /dev/null
@@ -1,156 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (C) 2006-2007 Richard Purdie
-#
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License version 2 as published by the Free
-# Software Foundation;
-#
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
-import optparse
-import os, sys, stat
-
-__version__ = "0.0.1"
-
-
-def write_cache(cachefile, cachedata):
-    fd = open(cachefile, 'w')
-    for f in cachedata:
-        s = f + '|' + str(cachedata[f]['ts']) + '|' + str(cachedata[f]['size'])
-        fd.write(s + '\n')
-    fd.close()
-
-def read_cache(cachefile):
-    cache = {}
-    f = open(cachefile, 'r')
-    lines = f.readlines()
-    f.close()
-    for l in lines:
-        data = l.split('|')
-        cache[data[0]] = {}
-        cache[data[0]]['ts'] = int(data[1])
-        cache[data[0]]['size'] = int(data[2])
-        cache[data[0]]['seen'] = False
-    return cache
-
-def mkdirhier(dir):
-    """Create a directory like 'mkdir -p', but does not complain if
-    directory already exists like os.makedirs
-    """
-    try:
-        os.makedirs(dir)
-    except OSError, e:
-        if e.errno != 17: raise e
-
-if __name__ == "__main__":
-    parser = optparse.OptionParser( version = "Metadata Stage Manager version %s" % ( __version__ ),
-    usage = """%prog [options]\n\nPerforms mamagement tasks on a metadata staging area.""" )
-
-    parser.add_option( "-p", "--parentdir", help = "the path to the metadata parent directory",
-               action = "store", dest = "parentdir", default = None)
-
-    parser.add_option( "-c", "--cachefile", help = "the cache file to use",
-               action = "store", dest = "cachefile", default = None)
-
-    parser.add_option( "-d", "--copydir", help = "copy changed files to this directory",
-               action = "store", dest = "copydir", default = None)
-
-    parser.add_option( "-u", "--update", help = "update the cache file",
-               action = "store_true", dest = "update", default = False)
-
-    (options, args) = parser.parse_args()
-
-    if options.parentdir is None:
-        print("Error, --parentdir option not supplied")
-        sys.exit(1)
-
-    if options.cachefile is None:
-        print("Error, --cachefile option not supplied")
-        sys.exit(1)
-
-    if not options.parentdir.endswith('/'):
-        options.parentdir = options.parentdir + '/'
-
-    cache = {}
-    if os.access(options.cachefile, os.F_OK):
-	cache = read_cache(options.cachefile)
-
-    found_difference = False
-
-    def updateCache(path, fstamp):
-        cache[path] = {}
-        cache[path]['ts'] = fstamp[stat.ST_MTIME]
-        cache[path]['size'] = fstamp[stat.ST_SIZE]
-        cache[path]['seen'] = True
-        found_difference = True
-
-    def copyfile(path):
-        if options.copydir:
-            copypath = os.path.join(options.copydir, path.replace(options.parentdir, '', 1))
-            mkdirhier(os.path.split(copypath)[0])
-            os.system("cp -dp " + path + " " + copypath)
-
-    def copydir(path, fstamp):
-        if options.copydir:
-            copypath = os.path.join(options.copydir, path.replace(options.parentdir, '', 1))
-            if os.path.exists(copypath):
-                os.system("rm -rf " + copypath)
-            if os.path.islink(path):
-                os.symlink(os.readlink(path), copypath)
-            else:
-                mkdirhier(copypath)
-                os.utime(copypath, (fstamp[stat.ST_ATIME], fstamp[stat.ST_MTIME]))
-
-    for root, dirs, files in os.walk(options.parentdir):
-        for f in files:
-            path = os.path.join(root, f)
-            if not os.access(path, os.R_OK):
-                continue
-            fstamp = os.lstat(path)
-            if path not in cache:
-                print "new file %s" % path
-		updateCache(path, fstamp)
-                copyfile(path)
-            else:
-                if cache[path]['ts'] != fstamp[stat.ST_MTIME] or cache[path]['size'] != fstamp[stat.ST_SIZE]:
-                    print "file %s changed" % path
-                    updateCache(path, fstamp)
-                    copyfile(path)
-		cache[path]['seen'] = True
-        for d in dirs:
-            path = os.path.join(root, d)
-            fstamp = os.lstat(path)
-            if path not in cache:
-                print "new dir %s" % path
-		updateCache(path, fstamp)
-                copydir(path, fstamp)
-            else:
-                if cache[path]['ts'] != fstamp[stat.ST_MTIME]:
-                    print "dir %s changed" % path
-                    updateCache(path, fstamp)
-                    copydir(path, fstamp)
-		cache[path]['seen'] = True
-
-    todel = []
-    for path in cache:
-        if not cache[path]['seen']:
-            print "%s removed" % path
-            found_difference = True
-            todel.append(path)
-
-    if options.update:
-        print "Updating"
-        for path in todel:
-            del cache[path]
-        mkdirhier(os.path.split(options.cachefile)[0])
-        write_cache(options.cachefile, cache)
-
-    if found_difference:
-        sys.exit(5)
-    sys.exit(0)
-
-
-
diff --git a/scripts/stage-manager-ipkg b/scripts/stage-manager-ipkg
deleted file mode 100755
index 2559fdb..0000000
--- a/scripts/stage-manager-ipkg
+++ /dev/null
@@ -1,1186 +0,0 @@
-#!/bin/sh
-# ipkg - the itsy package management system
-#
-# Copyright (C) 2001 Carl D. Worth
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-set -e
-
-# Uncomment for debugging
-#set -x
-
-# By default do not do globbing. Any command wanting globbing should
-# explicitly enable it first and disable it afterwards.
-set -o noglob
-
-ipkg_srcs() {
-	local srcre="$1"
-	sed -ne "s/^src[[:space:]]\+$srcre[[:space:]]\+//p" < $IPKG_CONF
-}
-
-ipkg_src_names() {
-	sed -ne "s/^src[[:space:]]\+\([^[:space:]]\+\).*/\1/p" < $IPKG_CONF
-}
-
-ipkg_src_byname() {
-	local src="$1"
-	ipkg_srcs $src | head -n1
-}
-
-ipkg_dests() {
-	local destre=`echo $1 | ipkg_protect_slashes`
-	sed -ne "/^dest[[:space:]]\+$destre/{
-s/^dest[[:space:]]\+[^[:space:]]\+[[:space:]]\+//
-s/^/`echo $IPKG_OFFLINE_ROOT | ipkg_protect_slashes`/
-p
-}" < $IPKG_CONF
-}
-
-ipkg_dest_names() {
-	sed -ne "s/^dest[[:space:]]\+\([^[:space:]]\+\).*/\1/p" < $IPKG_CONF
-}
-
-ipkg_dests_all() {
-	ipkg_dests '.*'
-}
-
-ipkg_state_dirs() {
-	ipkg_dests_all | sed "s|\$|/$IPKG_DIR_PREFIX|"
-}
-
-ipkg_dest_default() {
-	ipkg_dests_all | head -n1
-}
-
-ipkg_dest_default_name() {
-	ipkg_dest_names | head -n1
-}
-
-ipkg_dest_byname() {
-	local dest="$1"
-	ipkg_dests $dest | head -n1
-}
-
-ipkg_option() {
-	local option="$1"
-	sed -ne "s/^option[[:space:]]\+$option[[:space:]]\+//p" < $IPKG_CONF
-}
-
-ipkg_load_configuration() {
-	if [ -z "$IPKG_CONF_DIR" ]; then
-		IPKG_CONF_DIR=/etc
-	fi
-
-	if [ -z "$IPKG_CONF" ]; then
-		IPKG_CONF=$IPKG_CONF_DIR/ipkg.conf
-	fi
-
-	if [ -z "$IPKG_OFFLINE_ROOT" ]; then
-	    IPKG_OFFLINE_ROOT=`ipkg_option offline_root`
-	fi
-	# Export IPKG_OFFLINE_ROOT for use by update-alternatives
-	export IPKG_OFFLINE_ROOT
-	if [ -n "$DEST_NAME" ]; then
-		IPKG_ROOT=`ipkg_dest_byname $DEST_NAME`
-		if [ -z "$IPKG_ROOT" ]; then
-			if [ -d "$IPKG_OFFLINE_ROOT$DEST_NAME" ]; then
-				IPKG_ROOT="$IPKG_OFFLINE_ROOT$DEST_NAME";
-			else
-				echo "ipkg: invalid destination specification: $DEST_NAME
-Valid destinations are directories or one of the dest names from $IPKG_CONF:" >&2
-				ipkg_dest_names >&2
-				return 1
-			fi
-		fi
-	else
-		IPKG_ROOT=`ipkg_dest_default`
-	fi
-
-	# Global ipkg state directories
-	IPKG_DIR_PREFIX=usr/lib/ipkg
-	IPKG_LISTS_DIR=$IPKG_OFFLINE_ROOT/$IPKG_DIR_PREFIX/lists
-	IPKG_PENDING_DIR=$IPKG_OFFLINE_ROOT/$IPKG_DIR_PREFIX/pending
-	IPKG_TMP=`mktemp -d`
-
-	if [ ! -d "$IPKG_TMP" ]; then
-		echo "Error, could not create a temp directory"
-		return 1
-	fi
-
-	# Destination specific ipkg meta-data directory
-	IPKG_STATE_DIR=$IPKG_ROOT/$IPKG_DIR_PREFIX
-
-	# Proxy Support
-	IPKG_PROXY_USERNAME=`ipkg_option proxy_username`
-	IPKG_PROXY_PASSWORD=`ipkg_option proxy_password`
-	IPKG_HTTP_PROXY=`ipkg_option http_proxy`
-	IPKG_FTP_PROXY=`ipkg_option ftp_proxy`
-	IPKG_NO_PROXY=`ipkg_option no_proxy`
-	if [ -n "$IPKG_HTTP_PROXY" ]; then 
-		export http_proxy="$IPKG_HTTP_PROXY"
-	fi
-
-	if [ -n "$IPKG_FTP_PROXY" ]; then 
-		export ftp_proxy="$IPKG_FTP_PROXY"
-	fi
-
-	if [ -n "$IPKG_NO_PROXY" ]; then 
-		export no_proxy="$IPKG_NO_PROXY"
-	fi
-
-	IPKG_STATUS_FIELDS='\(Package\|Status\|Essential\|Version\|Conffiles\|Root\)'
-}
-
-ipkg_usage() {
-	[ $# -gt 0 ] && echo "ipkg: $*"
-	echo "
-usage: ipkg [options...] sub-command [arguments...]
-where sub-command is one of:
-
-Package Manipulation:
-	update  		Update list of available packages
-	upgrade			Upgrade all installed packages to latest version
-	install <pkg>		Download and install <pkg> (and dependencies)
-	install <file.ipk>	Install package <file.ipk>
-	install <file.deb>	Install package <file.deb>
-	remove <pkg>		Remove package <pkg>
-
-Informational Commands:
-	list    		List available packages and descriptions
-	files <pkg>		List all files belonging to <pkg>
-	search <file>		Search for a packaging providing <file>
-	info [pkg [<field>]]	Display all/some info fields for <pkg> or all
-	status [pkg [<field>]]	Display all/some status fields for <pkg> or all
-	depends <pkg>		Print uninstalled package dependencies for <pkg>
-
-Options:
-	-d <dest_name>          Use <dest_name> as the the root directory for
-	-dest <dest_name>	package installation, removal, upgrading.
-				<dest_name> should be a defined dest name from the
-				configuration file, (but can also be a directory
-				name in a pinch).
-        -o <offline_root>       Use <offline_root> as the root for offline installation.
-        -offline <offline_root> 				
-
-Force Options (use when ipkg is too smart for its own good):
-	-force-depends          Make dependency checks warnings instead of errors
-	-force-defaults         Use default options for questions asked by ipkg.
-                                (no prompts). Note that this will not prevent
-                                package installation scripts from prompting.
-" >&2
-	exit 1
-}
-
-ipkg_dir_part() {
-	local dir=`echo $1 | sed -ne 's/\(.*\/\).*/\1/p'`
-	if [ -z "$dir" ]; then
-		dir="./"
-	fi
-	echo $dir
-}
-
-ipkg_file_part() {
-	echo $1 | sed 's/.*\///'
-}
-
-ipkg_protect_slashes() {
-	sed -e 's/\//\\\//g'
-}
-
-ipkg_download() {
-	local src="$1"
-	local dest="$2"
-
-	local src_file=`ipkg_file_part $src`
-	local dest_dir=`ipkg_dir_part $dest`
-	if [ -z "$dest_dir" ]; then
-		dest_dir="$IPKG_TMP"
-	fi
-
-	local dest_file=`ipkg_file_part $dest`
-	if [ -z "$dest_file" ]; then
-		dest_file="$src_file"
-	fi
-
-	# Proxy support
-	local proxyuser=""
-	local proxypassword=""
-	local proxyoption=""
-		
-	if [ -n "$IPKG_PROXY_USERNAME" ]; then
-		proxyuser="--proxy-user=\"$IPKG_PROXY_USERNAME\""
-		proxypassword="--proxy-passwd=\"$IPKG_PROXY_PASSWORD\""
-	fi
-
-	if [ -n "$IPKG_PROXY_HTTP" -o -n "$IPKG_PROXY_FTP" ]; then
-		proxyoption="--proxy=on"
-	fi
-
-	echo "Downloading $src ..."
-	rm -f $IPKG_TMP/$src_file
-	case "$src" in
-	http://* | ftp://*)
-		if ! wget --passive-ftp -nd $proxyoption $proxyuser $proxypassword -P $IPKG_TMP $src; then
-			echo "ipkg_download: ERROR: Failed to retrieve $src, returning $err"
-			return 1
-		fi
-		mv $IPKG_TMP/$src_file $dest_dir/$dest_file 2>/dev/null
-		;;
-	file:/* )
-		ln -s `echo $src | sed 's/^file://'` $dest_dir/$dest_file 2>/dev/null
-		;;
-	*)
-	echo "DEBUG: $src"
-		;;
-	esac
-
-	echo "Done."
-	return 0
-}
-
-ipkg_update() {
-	if [ ! -e "$IPKG_LISTS_DIR" ]; then
-		mkdir -p $IPKG_LISTS_DIR
-	fi
-
-	local err=
-	for src_name in `ipkg_src_names`; do
-		local src=`ipkg_src_byname $src_name`
-		if ! ipkg_download $src/Packages $IPKG_LISTS_DIR/$src_name; then
-			echo "ipkg_update: Error downloading $src/Packages to $IPKG_LISTS_DIR/$src_name" >&2
-			err=t
-		else
-			echo "Updated list of available packages in $IPKG_LISTS_DIR/$src_name"
-		fi
-	done
-
-	[ -n "$err" ] && return 1
-
-	return 0
-}
-
-ipkg_list() {
-	for src in `ipkg_src_names`; do
-		if ipkg_require_list $src; then 
-# black magic...
-sed -ne "
-/^Package:/{
-s/^Package:[[:space:]]*\<\([a-z0-9.+-]*$1[a-z0-9.+-]*\).*/\1/
-h
-}
-/^Description:/{
-s/^Description:[[:space:]]*\(.*\)/\1/
-H
-g
-s/\\
-/ - /
-p
-}
-" $IPKG_LISTS_DIR/$src
-		fi
-	done
-}
-
-ipkg_extract_paragraph() {
-	local pkg="$1"
-	sed -ne "/Package:[[:space:]]*$pkg[[:space:]]*\$/,/^\$/p"
-}
-
-ipkg_extract_field() {
-	local field="$1"
-# blacker magic...
-	sed -ne "
-: TOP
-/^$field:/{
-p
-n
-b FIELD
-}
-d
-: FIELD
-/^$/b TOP
-/^[^[:space:]]/b TOP
-p
-n
-b FIELD
-"
-}
-
-ipkg_extract_value() {
-	sed -e "s/^[^:]*:[[:space:]]*//"
-}
-
-ipkg_require_list() {
-	[ $# -lt 1 ] && return 1
-	local src="$1"
-	if [ ! -f "$IPKG_LISTS_DIR/$src" ]; then
-		echo "ERROR: File not found: $IPKG_LISTS_DIR/$src" >&2
-		echo "       You probably want to run \`ipkg update'" >&2
-		return 1
-	fi
-	return 0
-}
-
-ipkg_info() {
-	for src in `ipkg_src_names`; do
-		if ipkg_require_list $src; then
-			case $# in
-			0)
-				cat $IPKG_LISTS_DIR/$src
-				;;	
-			1)
-				ipkg_extract_paragraph $1 < $IPKG_LISTS_DIR/$src
-				;;
-			*)
-				ipkg_extract_paragraph $1 < $IPKG_LISTS_DIR/$src | ipkg_extract_field $2
-				;;
-			esac
-		fi
-	done
-}
-
-ipkg_status_sd() {
-	[ $# -lt 1 ] && return 0
-	sd="$1"
-	shift
-	if [ -f $sd/status ]; then
-		case $# in
-		0)
-			cat $sd/status
-			;;
-		1)
-			ipkg_extract_paragraph $1 < $sd/status
-			;;
-		*)
-			ipkg_extract_paragraph $1 < $sd/status | ipkg_extract_field $2
-			;;
-		esac
-	fi
-	return 0
-}
-
-ipkg_status_all() {
-	for sd in `ipkg_state_dirs`; do
-		ipkg_status_sd $sd $*
-	done
-}
-
-ipkg_status() {
-	if [ -n "$DEST_NAME" ]; then
-		ipkg_status_sd $IPKG_STATE_DIR $*
-	else
-		ipkg_status_all $*
-	fi
-}
-
-ipkg_status_matching_sd() {
-	local sd="$1"
-	local re="$2"
-	if [ -f $sd/status ]; then
-		sed -ne "
-: TOP
-/^Package:/{
-s/^Package:[[:space:]]*//
-s/[[:space:]]*$//
-h
-}
-/$re/{
-g
-p
-b NEXT
-}
-d
-: NEXT
-/^$/b TOP
-n
-b NEXT
-" < $sd/status
-	fi
-	return 0
-}
-
-ipkg_status_matching_all() {
-	for sd in `ipkg_state_dirs`; do
-		ipkg_status_matching_sd $sd $*
-	done
-}
-
-ipkg_status_matching() {
-	if [ -n "$DEST_NAME" ]; then
-		ipkg_status_matching_sd $IPKG_STATE_DIR $*
-	else
-		ipkg_status_matching_all $*
-	fi
-}
-
-ipkg_status_installed_sd() {
-	local sd="$1"
-	local pkg="$2"
-	ipkg_status_sd $sd $pkg Status | grep -q "Status: install ok installed"
-}
-
-ipkg_status_installed_all() {
-	local ret=1
-	for sd in `ipkg_state_dirs`; do
-		if `ipkg_status_installed_sd $sd $*`; then
-			ret=0
-		fi
-	done
-	return $ret
-}
-
-ipkg_status_mentioned_sd() {
-	local sd="$1"
-	local pkg="$2"
-	[ -n "`ipkg_status_sd $sd $pkg Status`" ]
-}
-
-ipkg_files() {
-	local pkg="$1"
-	if [ -n "$DEST_NAME" ]; then
-		dests=$IPKG_ROOT
-	else
-		dests=`ipkg_dests_all`
-	fi
-	for dest in $dests; do
-		if [ -f $dest/$IPKG_DIR_PREFIX/info/$pkg.list ]; then
-			dest_sed=`echo $dest | ipkg_protect_slashes`
-			sed -e "s/^/$dest_sed/" < $dest/$IPKG_DIR_PREFIX/info/$pkg.list
-		fi
-	done
-}
-
-ipkg_search() {
-	local pattern="$1"
-
-	for dest_name in `ipkg_dest_names`; do
-		dest=`ipkg_dest_byname $dest_name`
-		dest_sed=`echo $dest | ipkg_protect_slashes`
-
-		set +o noglob
-		local list_files=`ls -1 $dest/$IPKG_DIR_PREFIX/info/*.list 2>/dev/null`
-		set -o noglob
-		for file in $list_files; do
-			if sed "s/^/$dest_sed/" $file | grep -q $pattern; then
-				local pkg=`echo $file | sed "s/^.*\/\(.*\)\.list/\1/"`
-				[ "$dest_name" != `ipkg_dest_default_name` ] && pkg="$pkg ($dest_name)"
-				sed "s/^/$dest_sed/" $file | grep $pattern | sed "s/^/$pkg: /"
-			fi
-		done
-	done
-}
-
-ipkg_status_remove_sd() {
-	local sd="$1"
-	local pkg="$2"
-
-	if [ ! -f $sd/status ]; then
-		mkdir -p $sd
-		touch $sd/status
-	fi
-	sed -ne "/Package:[[:space:]]*$pkg[[:space:]]*\$/,/^\$/!p" < $sd/status > $sd/status.new
-	mv $sd/status.new $sd/status
-}
-
-ipkg_status_remove_all() {
-	for sd in `ipkg_state_dirs`; do
-		ipkg_status_remove_sd $sd $*
-	done
-}
-
-ipkg_status_remove() {
-	if [ -n "$DEST_NAME" ]; then
-		ipkg_status_remove_sd $IPKG_STATE_DIR $*
-	else
-		ipkg_status_remove_all $*
-	fi
-}
-
-ipkg_status_update_sd() {
-	local sd="$1"
-	local pkg="$2"
-
-	ipkg_status_remove_sd $sd $pkg
-	ipkg_extract_field "$IPKG_STATUS_FIELDS" >> $sd/status
-	echo "" >> $sd/status
-}
-
-ipkg_status_update() {
-	ipkg_status_update_sd $IPKG_STATE_DIR $*
-}
-
-ipkg_unsatisfied_dependences() {
-    local pkg=$1
-    local deps=`ipkg_get_depends $pkg`
-    local remaining_deps=
-    for dep in $deps; do
-	local installed=`ipkg_get_installed $dep`
-	if [ "$installed" != "installed" ] ; then
-	    remaining_deps="$remaining_deps $dep"
-	fi
-    done
-    ## echo "ipkg_unsatisfied_dependences pkg=$pkg $remaining_deps" > /dev/console
-    echo $remaining_deps
-}
-
-ipkg_safe_pkg_name() {
-	local pkg=$1
-	local spkg=`echo pkg_$pkg | sed -e y/-+./___/`
-	echo $spkg
-}
-
-ipkg_set_depends() {
-	local pkg=$1; shift 
-	local new_deps="$*"
-	pkg=`ipkg_safe_pkg_name $pkg`
-	## setvar ${pkg}_depends "$new_deps"
-	echo $new_deps > $IPKG_TMP/${pkg}.depends
-}
-
-ipkg_get_depends() {
-	local pkg=$1
-	pkg=`ipkg_safe_pkg_name $pkg`
-	cat $IPKG_TMP/${pkg}.depends
-	## eval "echo \$${pkg}_depends"
-}
-
-ipkg_set_installed() {
-	local pkg=$1
-	pkg=`ipkg_safe_pkg_name $pkg`
-	echo installed > $IPKG_TMP/${pkg}.installed
-	## setvar ${pkg}_installed "installed"
-}
-
-ipkg_set_uninstalled() {
-	local pkg=$1
-	pkg=`ipkg_safe_pkg_name $pkg`
-	### echo ipkg_set_uninstalled $pkg > /dev/console
-	echo uninstalled > $IPKG_TMP/${pkg}.installed
-	## setvar ${pkg}_installed "uninstalled"
-}
-
-ipkg_get_installed() {
-	local pkg=$1
-	pkg=`ipkg_safe_pkg_name $pkg`
-	if [ -f $IPKG_TMP/${pkg}.installed ]; then
-		cat $IPKG_TMP/${pkg}.installed
-	fi
-	## eval "echo \$${pkg}_installed"
-}
-
-ipkg_depends() {
-	local new_pkgs="$*"
-	local all_deps=
-	local installed_pkgs=`ipkg_status_matching_all 'Status:.*[[:space:]]installed'`
-	for pkg in $installed_pkgs; do
-	    ipkg_set_installed $pkg
-	done
-	while [ -n "$new_pkgs" ]; do
-		all_deps="$all_deps $new_pkgs"
-		local new_deps=
-		for pkg in $new_pkgs; do
-			if echo $pkg | grep -q '[^a-z0-9.+-]'; then
-				echo "ipkg_depends: ERROR: Package name $pkg contains illegal characters (should be [a-z0-9.+-])" >&2
-				return 1
-			fi
-			# TODO: Fix this. For now I am ignoring versions and alternations in dependencies.
-			new_deps="$new_deps "`ipkg_info $pkg '\(Pre-\)\?Depends' | ipkg_extract_value | sed -e 's/([^)]*)//g
-s/\(|[[:space:]]*[a-z0-9.+-]\+[[:space:]]*\)\+//g
-s/,/ /g
-s/ \+/ /g'`
-			ipkg_set_depends $pkg $new_deps
-		done
-
-		new_deps=`echo $new_deps | sed -e 's/[[:space:]]\+/\\
-/g' | sort | uniq`
-
-		local maybe_new_pkgs=
-		for pkg in $new_deps; do
-			if ! echo $installed_pkgs | grep -q "\<$pkg\>"; then
-				maybe_new_pkgs="$maybe_new_pkgs $pkg"
-			fi
-		done
-
-		new_pkgs=
-		for pkg in $maybe_new_pkgs; do
-			if ! echo $all_deps | grep -q "\<$pkg\>"; then
-				if [ -z "`ipkg_info $pkg`" ]; then
-					echo "ipkg_depends: Warning: $pkg mentioned in dependency but no package found in $IPKG_LISTS_DIR" >&2
-					ipkg_set_installed $pkg
-				else
-					new_pkgs="$new_pkgs $pkg"
-					ipkg_set_uninstalled $pkg
-				fi
-			else
-				ipkg_set_uninstalled $pkg
-			fi
-		done
-	done
-
-	echo $all_deps
-}
-
-ipkg_get_install_dest() {
-	local dest="$1"
-	shift
-	local sd=$dest/$IPKG_DIR_PREFIX
-	local info_dir=$sd/info
-
-        local requested_pkgs="$*"
-	local pkgs=`ipkg_depends $*`
-
-	mkdir -p $info_dir
-	for pkg in $pkgs; do
-		if ! ipkg_status_mentioned_sd $sd $pkg; then
-			echo "Package: $pkg
-Status: install ok not-installed" | ipkg_status_update_sd $sd $pkg
-		fi
-	done
-        ## mark the packages that we were directly requested to install as uninstalled
-        for pkg in $requested_pkgs; do ipkg_set_uninstalled $pkg; done
-
-	local new_pkgs=
-	local pkgs_installed=0
-	while [ -n "pkgs" ]; do
-		curcheck=0
-		## echo "pkgs to install: {$pkgs}" > /dev/console
-		for pkg in $pkgs; do
-			curcheck=`expr $curcheck + 1`
-			local is_installed=`ipkg_get_installed $pkg`
-			if [ "$is_installed" = "installed" ]; then
-				echo "$pkg is installed" > /dev/console
-				continue
-			fi
-
-			local remaining_deps=`ipkg_unsatisfied_dependences $pkg`
-			if [ -n "$remaining_deps" ]; then
-				new_pkgs="$new_pkgs $pkg"
-				### echo "Dependences not satisfied for $pkg: $remaining_deps"
-				if [ $curcheck -ne `echo  $pkgs|wc -w` ]; then
-			        	continue
-				fi
-			fi
-
-			local filename=
-			for src in `ipkg_src_names`; do
-				if ipkg_require_list $src; then
-					filename=`ipkg_extract_paragraph $pkg < $IPKG_LISTS_DIR/$src | ipkg_extract_field Filename | ipkg_extract_value`
-					[ -n "$filename" ] && break
-				fi
-			done
-
-			if [ -z "$filename" ]; then
-				echo "ipkg_get_install: ERROR: Cannot find package $pkg in $IPKG_LISTS_DIR"
-				echo "ipkg_get_install:        Check the spelling and maybe run \`ipkg update'."
-				ipkg_status_remove_sd $sd $pkg
-				return 1;
-			fi
-
-			echo ""
-			local tmp_pkg_file="$IPKG_TMP/"`ipkg_file_part $filename`
-			if ! ipkg_download `ipkg_src_byname $src`/$filename $tmp_pkg_file; then
-				echo "ipkg_get_install: Perhaps you need to run \`ipkg update'?"
-				return 1
-			fi
-
-			if ! ipkg_install_file_dest $dest $tmp_pkg_file; then
-				echo "ipkg_get_install: ERROR: Failed to install $tmp_pkg_file"
-				echo "ipkg_get_install: I'll leave it there for you to try a manual installation"
-				return 1
-			fi
-
-			ipkg_set_installed $pkg
-			pkgs_installed=`expr $pkgs_installed + 1`
-			rm $tmp_pkg_file
-		done
-		### echo "Installed $pkgs_installed package(s) this round"
-		if [ $pkgs_installed -eq 0 ]; then
-			if [ -z "$new_pkgs" ]; then
-			    break
-			fi
-		fi
-		pkgs_installed=0
-		pkgs="$new_pkgs"
-		new_pkgs=
-		curcheck=0
-        done
-}
-
-ipkg_get_install() {
-	ipkg_get_install_dest $IPKG_ROOT $*
-}
-
-ipkg_install_file_dest() {
-	local dest="$1"
-	local filename="$2"
-	local sd=$dest/$IPKG_DIR_PREFIX
-	local info_dir=$sd/info
-
-	if [ ! -f "$filename" ]; then
-		echo "ipkg_install_file: ERROR: File $filename not found"
-		return 1
-	fi
-
-	local pkg=`ipkg_file_part $filename | sed 's/\([a-z0-9.+-]\+\)_.*/\1/'`
-	local ext=`echo $filename | sed 's/.*\.//'`
-	local pkg_extract_stdout
-	#if [ "$ext" = "ipk" ]; then
-	#	pkg_extract_stdout="tar -xzOf"
-	#elif [ "$ext" = "deb" ]; then
-		pkg_extract_stdout="ar p"
-	#else
-	#	echo "ipkg_install_file: ERROR: File $filename has unknown extension $ext (not .ipk or .deb)"
-	#	return 1
-	#fi
-
-	# Check dependencies
-	local depends=`ipkg_depends $pkg | sed -e "s/\<$pkg\>//"`
-
-	# Don't worry about deps that are scheduled for installation
-	local missing_deps=
-	for dep in $depends; do
-		if ! ipkg_status_all $dep | grep -q 'Status:[[:space:]]install'; then
-			missing_deps="$missing_deps $dep"
-		fi
-	done
-
-	if [ ! -z "$missing_deps" ]; then
-		if [ -n "$FORCE_DEPENDS" ]; then
-			echo "ipkg_install_file: Warning: $pkg depends on the following uninstalled programs: $missing_deps"
-		else
-			echo "ipkg_install_file: ERROR: $pkg depends on the following uninstalled programs:
-	$missing_deps"
-			echo "ipkg_install_file: You may want to use \`ipkg install' to install these."
-			return 1
-		fi
-	fi
-
-	mkdir -p $IPKG_TMP/$pkg/control
-	mkdir -p $IPKG_TMP/$pkg/data
-	mkdir -p $info_dir
-
-	if ! $pkg_extract_stdout $filename control.tar.gz | (cd $IPKG_TMP/$pkg/control; tar -xzf - ) ; then
-		echo "ipkg_install_file: ERROR unpacking control.tar.gz from $filename"
-		return 1
-	fi
-
-	if [ -n "$IPKG_OFFLINE_ROOT" ]; then
-		if grep -q '^InstallsOffline:[[:space:]]*no' $IPKG_TMP/$pkg/control/control; then
-			echo "*** Warning: Package $pkg may not be installed in offline mode"
-			echo "*** Warning: Scheduling $filename for pending installation (installing into $IPKG_PENDING_DIR)"
-			echo "Package: $pkg
-Status: install ok pending" | ipkg_status_update_sd $sd $pkg
-			mkdir -p $IPKG_PENDING_DIR
-			cp $filename $IPKG_PENDING_DIR
-			rm -r $IPKG_TMP/$pkg/control
-			rm -r $IPKG_TMP/$pkg/data
-			rmdir $IPKG_TMP/$pkg
-			return 0
-		fi
-	fi
-
-
-	echo -n "Unpacking $pkg..."
-	set +o noglob
-	for file in $IPKG_TMP/$pkg/control/*; do
-		local base_file=`ipkg_file_part $file`
-		mv $file $info_dir/$pkg.$base_file
-	done
-	set -o noglob
-	rm -r $IPKG_TMP/$pkg/control
-
-	if ! $pkg_extract_stdout $filename ./data.tar.gz | (cd $IPKG_TMP/$pkg/data; tar -xzf - ) ; then
-		echo "ipkg_install_file: ERROR unpacking data.tar.gz from $filename"
-		return 1
-	fi
-	echo "Done."
-
-	echo -n "Configuring $pkg..."
-	export PKG_ROOT=$dest
-	if [ -x "$info_dir/$pkg.preinst" ]; then
-		if ! $info_dir/$pkg.preinst install; then
-			echo "$info_dir/$pkg.preinst failed. Aborting installation of $pkg"
-			rm -rf $IPKG_TMP/$pkg/data
-			rmdir $IPKG_TMP/$pkg
-			return 1
-		fi
-	fi
-
-	local old_conffiles=`ipkg_status_sd $sd $pkg Conffiles | ipkg_extract_value`
-	local new_conffiles=
-	if [ -f "$info_dir/$pkg.conffiles" ]; then
-		for conffile in `cat $info_dir/$pkg.conffiles`; do
-			if [ -f "$dest/$conffile" ] && ! echo " $old_conffiles " | grep -q " $conffile "`md5sum $dest/$conffile | sed 's/ .*//'`; then
-				local use_maintainers_conffile=
-				if [ -z "$FORCE_DEFAULTS" ]; then
-					while true; do
-						echo -n "Configuration file \`$conffile'
- ==> File on system created by you or by a script.
- ==> File also in package provided by package maintainer.
-   What would you like to do about it ?  Your options are:
-    Y or I  : install the package maintainer's version
-    N or O  : keep your currently-installed version
-      D     : show the differences between the versions (if diff is installed)
- The default action is to keep your current version.
-*** `ipkg_file_part $conffile` (Y/I/N/O/D) [default=N] ? "
-						read response
-						case "$response" in
-						[YyIi] | [Yy][Ee][Ss])
-							use_maintainers_conffile=t
-							break
-						;;
-						[Dd])
-							echo "
-diff -u $dest/$conffile $IPKG_TMP/$pkg/data/$conffile"
-							diff -u $dest/$conffile $IPKG_TMP/$pkg/data/$conffile || true
-							echo "[Press ENTER to continue]"
-							read junk
-						;;
-						*)
-							break
-						;;
-						esac
-					done
-				fi
-				if [ -n "$use_maintainers_conffile" ]; then
-					local md5sum=`md5sum $IPKG_TMP/$pkg/data/$conffile | sed 's/ .*//'`
-					new_conffiles="$new_conffiles $conffile $md5sum"
-				else
-					new_conffiles="$new_conffiles $conffile <custom>"
-					rm $IPKG_TMP/$pkg/data/$conffile
-				fi
-			else
-				md5sum=`md5sum $IPKG_TMP/$pkg/data/$conffile | sed 's/ .*//'`
-				new_conffiles="$new_conffiles $conffile $md5sum"
-			fi
-		done
-	fi
-
-	local owd=`pwd`
-	(cd $IPKG_TMP/$pkg/data/; tar cf - . | (cd $owd; cd $dest; tar xf -))		
-	rm -rf $IPKG_TMP/$pkg/data
-	rmdir $IPKG_TMP/$pkg
-	$pkg_extract_stdout $filename ./data.tar.gz | tar tzf - | sed -e 's/^\.//' > $info_dir/$pkg.list
-
-	if [ -x "$info_dir/$pkg.postinst" ]; then
-		$info_dir/$pkg.postinst configure
-	fi
-
-	if [ -n "$new_conffiles" ]; then
-		new_conffiles='Conffiles: '`echo $new_conffiles | ipkg_protect_slashes`
-	fi
-	local sed_safe_root=`echo $dest | sed -e "s#^${IPKG_OFFLINE_ROOT}##" | ipkg_protect_slashes`
-	sed -e "s/\(Package:.*\)/\1\\
-Status: install ok installed\\
-Root: ${sed_safe_root}\\
-${new_conffiles}/" $info_dir/$pkg.control | ipkg_status_update_sd $sd $pkg
-
-	rm -f $info_dir/$pkg.control
-	rm -f $info_dir/$pkg.conffiles
-	rm -f $info_dir/$pkg.preinst
-	rm -f $info_dir/$pkg.postinst
-
-	echo "Done."
-}
-
-ipkg_install_file() {
-	ipkg_install_file_dest $IPKG_ROOT $*
-}
-
-ipkg_install() {
-
-	while [ $# -gt 0 ]; do
-		local pkg="$1"
-		shift
-	
-		case "$pkg" in
-		http://* | ftp://*)
-			local tmp_pkg_file="$IPKG_TMP/"`ipkg_file_part $pkg`
-			if ipkg_download $pkg $tmp_pkg_file; then
-				ipkg_install_file $tmp_pkg_file
-				rm $tmp_pkg_file
-			fi
-			;;
-		file:/*.ipk  | file://*.deb)
-				local ipkg_filename="`echo $pkg|sed 's/^file://'`"
-				ipkg_install_file $ipkg_filename
-			;;
-		*.ipk  | *.deb)
-			if [ -f "$pkg" ]; then
-				ipkg_install_file $pkg
-			else
-				echo "File not found $pkg" >&2
-			fi
-			;;
-		*)
-			ipkg_get_install $pkg || true
-			;;
-		esac
-	done
-}
-
-ipkg_install_pending() {
-	[ -n "$IPKG_OFFLINE_ROOT" ] && return 0
-
-	if [ -d "$IPKG_PENDING_DIR" ]; then
-		set +o noglob
-		local pending=`ls -1d $IPKG_PENDING_DIR/*.ipk 2> /dev/null` || true
-		set -o noglob
-		if [ -n "$pending" ]; then
-			echo "The following packages in $IPKG_PENDING_DIR will now be installed:"
-			echo $pending
-			for filename in $pending; do
-				if ipkg_install_file $filename; then
-					rm $filename
-				fi
-			done
-		fi
-	fi
-	return 0
-}
-
-ipkg_install_wanted() {
-	local wanted=`ipkg_status_matching 'Status:[[:space:]]*install.*not-installed'`
-
-	if [ -n "$wanted" ]; then
-		echo "The following package were previously requested but have not been installed:"
-		echo $wanted
-
-		if [ -n "$FORCE_DEFAULTS" ]; then
-			echo "Installing them now."
-		else
-			echo -n "Install them now [Y/n] ? "
-			read response
-			case "$response" in
-			[Nn] | [Nn][Oo])
-				return 0
-				;;
-			esac
-		fi
-
-		ipkg_install $wanted
-	fi
-
-	return 0
-}
-
-ipkg_upgrade_pkg() {
-	local pkg="$1"
-	local avail_ver=`ipkg_info $pkg Version | ipkg_extract_value | head -n1`
-
-	is_installed=
-	for dest_name in `ipkg_dest_names`; do
-		local dest=`ipkg_dest_byname $dest_name`
-		local sd=$dest/$IPKG_DIR_PREFIX
-		local inst_ver=`ipkg_status_sd $sd $pkg Version | ipkg_extract_value`
-		if [ -n "$inst_ver" ]; then
-			is_installed=t
-
-			if [ -z "$avail_ver" ]; then
-				echo "Assuming locally installed package $pkg ($inst_ver) is up to date"
-				return 0
-			fi
-
-			if [ "$avail_ver" = "$inst_ver" ]; then 
-				echo "Package $pkg ($inst_ver) installed in $dest_name is up to date"
-			elif ipkg-compare-versions $avail_ver '>>' $inst_ver; then
-				echo "Upgrading $pkg ($dest_name) from $inst_ver to $avail_ver"
-				ipkg_get_install_dest $dest $pkg
-			else
-				echo "Not downgrading package $pkg from $inst_ver to $avail_ver"
-			fi
-		fi
-	done
-
-	if [ -z "$is_installed" ]; then
-		echo "Package $pkg does not appear to be installed"
-		return 0
-	fi
-
-}
-
-ipkg_upgrade() {
-	if [ $# -lt 1 ]; then
-		local pkgs=`ipkg_status_matching 'Status:.*[[:space:]]installed'`
-	else
-		pkgs="$*"
-	fi
-	
-	for pkg in $pkgs; do
-		ipkg_upgrade_pkg $pkg
-	done
-}
-
-ipkg_remove_pkg_dest() {
-	local dest="$1"
-	local pkg="$2"
-	local sd=$dest/$IPKG_DIR_PREFIX
-	local info_dir=$sd/info
-
-	if ! ipkg_status_installed_sd $sd $pkg; then
-		echo "ipkg_remove: Package $pkg does not appear to be installed in $dest"
-		if ipkg_status_mentioned_sd $sd $pkg; then
-			echo "Purging mention of $pkg from the ipkg database"
-			ipkg_status_remove_sd $sd $pkg
-		fi
-		return 1
-	fi
-
-	echo "ipkg_remove: Removing $pkg... "
-
-	local files=`cat $info_dir/$pkg.list`
-
-	export PKG_ROOT=$dest
-	if [ -x "$info_dir/$pkg.prerm" ]; then
-		$info_dir/$pkg.prerm remove
-	fi
-
-	local conffiles=`ipkg_status_sd $sd $pkg Conffiles | ipkg_extract_value`
-
-	local dirs_to_remove=
-	for file in $files; do
-		if [ -d "$dest/$file" ]; then
-			dirs_to_remove="$dirs_to_remove $dest/$file"
-		else
-			if echo " $conffiles " | grep -q " $file "; then
-				if echo " $conffiles " | grep -q " $file "`md5sum $dest/$file | sed 's/ .*//'`; then
-					rm -f $dest/$file
-				fi
-			else
-				rm -f $dest/$file
-			fi
-		fi
-	done
-
-	local removed_a_dir=t
-	while [ -n "$removed_a_dir" ]; do
-		removed_a_dir=
-		local new_dirs_to_remove=
-		for dir in $dirs_to_remove; do
-			if rmdir $dir >/dev/null 2>&1; then
-				removed_a_dir=t
-			else
-				new_dirs_to_remove="$new_dirs_to_remove $dir"
-			fi
-		done
-		dirs_to_remove="$new_dirs_to_remove"
-	done
-
-	if [ -n "$dirs_to_remove" ]; then
-		echo "ipkg_remove: Warning: Not removing the following directories since they are not empty:" >&2
-		echo "$dirs_to_remove" | sed -e 's/\/[/]\+/\//g' >&2
-	fi
-
-	if [ -x "$info_dir/$pkg.postrm" ]; then
-		$info_dir/$pkg.postrm remove
-	fi
-
-	ipkg_status_remove_sd $sd $pkg
-	set +o noglob
-	rm -f $info_dir/$pkg.*
-	set -o noglob
-
-	echo "Done."
-}
-
-ipkg_remove_pkg() {
-	local pkg="$1"
-	for dest in `ipkg_dests_all`; do
-		local sd=$dest/$IPKG_DIR_PREFIX
-		if ipkg_status_mentioned_sd $sd $pkg; then
-			ipkg_remove_pkg_dest $dest $pkg
-		fi
-	done
-}
-
-ipkg_remove() {
-	while [ $# -gt 0 ]; do
-		local pkg="$1"
-		shift
-		if [ -n "$DEST_NAME" ]; then
-			ipkg_remove_pkg_dest $IPKG_ROOT $pkg
-		else
-			ipkg_remove_pkg $pkg
-		fi
-	done
-}
-
-ipkg_list_installed() {
-	echo `ipkg_status_matching 'Status:.*[[:space:]]installed'`
-}
-###########
-# ipkg main
-###########
-
-# Parse options
-while [ $# -gt 0 ]; do
-	arg="$1"
-	case $arg in
-	-d | -dest)
-		[ $# -gt 1 ] || ipkg_usage "option $arg requires an argument"
-		DEST_NAME="$2"
-		shift
-		;;
-	-o | -offline)
-		[ $# -gt 1 ] || ipkg_usage "option $arg requires an argument"
-		IPKG_OFFLINE_ROOT="$2"
-		shift
-		;;
-	-force-depends)
-		FORCE_DEPENDS=t
-		;;
-	-force-defaults)
-		FORCE_DEFAULTS=t
-		;;
-	-f)
-		[ $# -gt 1 ] || ipkg_usage "option $arg requires an argument"
-		IPKG_CONF="$2"
-		shift
-		;;
-	-*)
-		ipkg_usage "unknown option $arg"
-		;;
-	*)
-		break
-		;;
-	esac
-	shift
-done
-
-[ $# -lt 1 ] && ipkg_usage "ipkg must have one sub-command argument"
-cmd="$1"
-shift
-
-ipkg_load_configuration
-
-case "$cmd" in
-update|upgrade|list|info|status|install_pending|list_installed)
-	;;
-install|depends|remove|files|search)
-	[ $# -lt 1 ] && ipkg_usage "ERROR: the \`\`$cmd'' command requires an argument"
-	;;
-*)
-	echo "ERROR: unknown sub-command \`$cmd'"
-	ipkg_usage
-	;;
-esac
-
-# Only install pending if we have an interactive sub-command
-case "$cmd" in
-upgrade|install)
-	ipkg_install_pending
-	ipkg_install_wanted
-	;;
-esac
-
-ipkg_$cmd $*
-rm -rf $IPKG_TMP
diff --git a/scripts/stage-manager-ipkg-build b/scripts/stage-manager-ipkg-build
deleted file mode 100755
index 77367ac..0000000
--- a/scripts/stage-manager-ipkg-build
+++ /dev/null
@@ -1,246 +0,0 @@
-#!/bin/sh
-
-# ipkg-build -- construct a .ipk from a directory
-# Carl Worth <cworth@east.isi.edu>
-# based on a script by Steve Redler IV, steve@sr-tech.com 5-21-2001
-# 2003-04-25 rea@sr.unh.edu
-#   Updated to work on Familiar Pre0.7rc1, with busybox tar.
-#   Note it Requires: binutils-ar (since the busybox ar can't create)
-#   For UID debugging it needs a better "find".
-set -e
-
-version=1.0
-
-ipkg_extract_value() {
-	sed -e "s/^[^:]*:[[:space:]]*//"
-}
-
-required_field() {
-	field=$1
-
-	value=`grep "^$field:" < $CONTROL/control | ipkg_extract_value`
-	if [ -z "$value" ]; then
-		echo "*** Error: $CONTROL/control is missing field $field" >&2
-		return 1
-	fi
-	echo $value
-	return 0
-}
-
-disallowed_field() {
-	field=$1
-
-	value=`grep "^$field:" < $CONTROL/control | ipkg_extract_value`
-	if [ -n "$value" ]; then
-		echo "*** Error: $CONTROL/control contains disallowed field $field" >&2
-		return 1
-	fi
-	echo $value
-	return 0
-}
-
-pkg_appears_sane() {
-	local pkg_dir=$1
-
-	local owd=`pwd`
-	cd $pkg_dir
-
-	PKG_ERROR=0
-
-	tilde_files=`find . -name '*~'`
-	if [ -n "$tilde_files" ]; then
-	    if [ "$noclean" = "1" ]; then
-		echo "*** Warning: The following files have names ending in '~'.
-You probably want to remove them: " >&2
-		ls -ld $tilde_files
-		echo >&2
-	    else
-		echo "*** Removing the following files: $tilde_files"
-		rm -f "$tilde_files"
-	    fi
-	fi
-
-	large_uid_files=`find . -uid +99 || true`
-
-	if [ "$ogargs" = "" ]  && [ -n "$large_uid_files" ]; then
-		echo "*** Warning: The following files have a UID greater than 99.
-You probably want to chown these to a system user: " >&2
-		ls -ld $large_uid_files
-		echo >&2
-	fi
-	    
-
-	if [ ! -f "$CONTROL/control" ]; then
-		echo "*** Error: Control file $pkg_dir/$CONTROL/control not found." >&2
-		cd $owd
-		return 1
-	fi
-
-	pkg=`required_field Package`
-	[ "$?" -ne 0 ] && PKG_ERROR=1
-
-	version=`required_field Version | sed 's/Version://; s/^.://g;'`
-	[ "$?" -ne 0 ] && PKG_ERROR=1
-
-	arch=`required_field Architecture`
-	[ "$?" -ne 0 ] && PKG_ERROR=1
-
-	required_field Maintainer >/dev/null
-	[ "$?" -ne 0 ] && PKG_ERROR=1
-
-	required_field Description >/dev/null
-	[ "$?" -ne 0 ] && PKG_ERROR=1
-
-	section=`required_field Section`
-	[ "$?" -ne 0 ] && PKG_ERROR=1
-	if [ -z "$section" ]; then
-	    echo "The Section field should have one of the following values:" >&2
-	    echo "admin, base, comm, editors, extras, games, graphics, kernel, libs, misc, net, text, web, x11" >&2
-	fi
-
-	priority=`required_field Priority`
-	[ "$?" -ne 0 ] && PKG_ERROR=1
-	if [ -z "$priority" ]; then
-	    echo "The Priority field should have one of the following values:" >&2
-	    echo "required, important, standard, optional, extra." >&2
-	    echo "If you don't know which priority value you should be using, then use \`optional'" >&2
-	fi
-
-	source=`required_field Source`
-	[ "$?" -ne 0 ] && PKG_ERROR=1
-	if [ -z "$source" ]; then
-	    echo "The Source field contain the URL's or filenames of the source code and any patches" 
-	    echo "used to build this package.  Either gnu-style tarballs or Debian source packages "
-	    echo "are acceptable.  Relative filenames may be used if they are distributed in the same"
-	    echo "directory as the .ipk file."
-	fi
-
-	disallowed_filename=`disallowed_field Filename`
-	[ "$?" -ne 0 ] && PKG_ERROR=1
-
-	if echo $pkg | grep '[^a-z0-9.+-]'; then
-		echo "*** Error: Package name $name contains illegal characters, (other than [a-z0-9.+-])" >&2
-		PKG_ERROR=1;
-	fi
-
-	local bad_fields=`sed -ne 's/^\([^[:space:]][^:[:space:]]\+[[:space:]]\+\)[^:].*/\1/p' < $CONTROL/control | sed -e 's/\\n//'`
-	if [ -n "$bad_fields" ]; then
-		bad_fields=`echo $bad_fields`
-		echo "*** Error: The following fields in $CONTROL/control are missing a ':'" >&2
-		echo "	$bad_fields" >&2
-		echo "ipkg-build: This may be due to a missing initial space for a multi-line field value" >&2
-		PKG_ERROR=1
-	fi
-
-	for script in $CONTROL/preinst $CONTROL/postinst $CONTROL/prerm $CONTROL/postrm; do
-		if [ -f $script -a ! -x $script ]; then
-			echo "*** Error: package script $script is not executable" >&2
-			PKG_ERROR=1
-		fi
-	done
-
-	if [ -f $CONTROL/conffiles ]; then
-		for cf in `cat $CONTROL/conffiles`; do
-			if [ ! -f ./$cf ]; then
-				echo "*** Error: $CONTROL/conffiles mentions conffile $cf which does not exist" >&2
-				PKG_ERROR=1
-			fi
-		done
-	fi
-
-	cd $owd
-	return $PKG_ERROR
-}
-
-###
-# ipkg-build "main"
-###
-ogargs=""
-outer=ar
-noclean=0
-usage="Usage: $0 [-c] [-C] [-o owner] [-g group] <pkg_directory> [<destination_directory>]"
-while getopts "cg:ho:v" opt; do
-    case $opt in
-	o ) owner=$OPTARG
-	    ogargs="--owner=$owner"
-	    ;;
-	g ) group=$OPTARG
-	    ogargs="$ogargs --group=$group"
-	    ;;
-        c ) outer=tar
-            ;;
-        C ) noclean=1
-            ;;
-	v ) echo $version
-	    exit 0
-	    ;;
-	h ) 	echo $usage  >&2 ;;
-	\? ) 	echo $usage  >&2
-	esac
-done
-
-
-shift $(($OPTIND - 1))
-
-# continue on to process additional arguments
-
-case $# in
-1)
-	dest_dir=$PWD
-	;;
-2)
-	dest_dir=$2
-	if [ "$dest_dir" = "." -o "$dest_dir" = "./" ] ; then
-	    dest_dir=$PWD
-	fi
-	;;
-*)
-	echo $usage >&2
-	exit 1 
-	;;
-esac
-
-pkg_dir=$1
-
-if [ ! -d $pkg_dir ]; then
-	echo "*** Error: Directory $pkg_dir does not exist" >&2
-	exit 1
-fi
-
-# CONTROL is second so that it takes precedence
-CONTROL=
-[ -d $pkg_dir/DEBIAN ] && CONTROL=DEBIAN
-[ -d $pkg_dir/CONTROL ] && CONTROL=CONTROL
-if [ -z "$CONTROL" ]; then
-	echo "*** Error: Directory $pkg_dir has no CONTROL subdirectory." >&2
-	exit 1
-fi
-
-if ! pkg_appears_sane $pkg_dir; then
-	echo >&2
-	echo "ipkg-build: Please fix the above errors and try again." >&2
-	exit 1
-fi
-
-tmp_dir=$dest_dir/IPKG_BUILD.$$
-mkdir $tmp_dir
-
-echo $CONTROL > $tmp_dir/tarX
-( cd $pkg_dir && tar $ogargs -X $tmp_dir/tarX -czf $tmp_dir/data.tar.gz . )
-( cd $pkg_dir/$CONTROL && tar $ogargs -czf $tmp_dir/control.tar.gz . )
-rm $tmp_dir/tarX
-
-echo "2.0" > $tmp_dir/debian-binary
-
-pkg_file=$dest_dir/${pkg}_${version}_${arch}.ipk
-rm -f $pkg_file
-if [ "$outer" = "ar" ] ; then
-  ( cd $tmp_dir && ar -crf $pkg_file ./debian-binary ./data.tar.gz ./control.tar.gz )
-else
-  ( cd $tmp_dir && tar -zcf $pkg_file ./debian-binary ./data.tar.gz ./control.tar.gz )
-fi
-
-rm $tmp_dir/debian-binary $tmp_dir/data.tar.gz $tmp_dir/control.tar.gz
-rmdir $tmp_dir
-
-echo "Packaged contents of $pkg_dir into $pkg_file"
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 06/16] curl: Fix gnutls option (append ordering was incorrect)
  2010-11-28 22:07 [PATCH 00/16] Poky core tweaks Richard Purdie
                   ` (4 preceding siblings ...)
  2010-11-28 13:14 ` [PATCH 05/16] scripts: Remove obsolete stage-manager scripts Richard Purdie
@ 2010-11-28 14:10 ` Richard Purdie
  2010-11-28 14:59 ` [PATCH 08/16] rm_work: Set BB_SCHEDULER as done in OE.dev to ensure disk space is freed sooner rather than at the end of the build Richard Purdie
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Richard Purdie @ 2010-11-28 14:10 UTC (permalink / raw)
  To: poky

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
---
 meta/recipes-support/curl/curl_7.21.2.bb |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-support/curl/curl_7.21.2.bb b/meta/recipes-support/curl/curl_7.21.2.bb
index fd1d5dd..3208baf 100644
--- a/meta/recipes-support/curl/curl_7.21.2.bb
+++ b/meta/recipes-support/curl/curl_7.21.2.bb
@@ -22,11 +22,12 @@ EXTRA_OECONF = "--with-zlib=${STAGING_LIBDIR}/../ \
 		--with-random=/dev/urandom \
 		--without-libidn \
 		--enable-crypto-auth \
+                ${CURLGNUTLS} \
 		"
 
-EXTRA_OECONF_append = " --with-gnutls=${STAGING_LIBDIR}/../"
-EXTRA_OECONF_virtclass-native_append = " --without-gnutls"
-EXTRA_OECONF_virtclass-nativesdk_append = " --without-gnutls"
+CURLGNUTLS = " --with-gnutls=${STAGING_LIBDIR}/../"
+CURLGNUTLS_virtclass-native = "--without-gnutls"
+CURLGNUTLS_virtclass-nativesdk = "--without-gnutls"
 
 do_configure_prepend() {
 	sed -i s:OPT_GNUTLS/bin:OPT_GNUTLS:g configure.ac
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 08/16] rm_work: Set BB_SCHEDULER as done in OE.dev to ensure disk space is freed sooner rather than at the end of the build
  2010-11-28 22:07 [PATCH 00/16] Poky core tweaks Richard Purdie
                   ` (5 preceding siblings ...)
  2010-11-28 14:10 ` [PATCH 06/16] curl: Fix gnutls option (append ordering was incorrect) Richard Purdie
@ 2010-11-28 14:59 ` Richard Purdie
  2010-11-28 15:00 ` [PATCH 09/16] utility-tasks: Switch listtasks to use bb.plain() for printing output Richard Purdie
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Richard Purdie @ 2010-11-28 14:59 UTC (permalink / raw)
  To: poky

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
---
 meta/classes/rm_work.bbclass |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/meta/classes/rm_work.bbclass b/meta/classes/rm_work.bbclass
index 87c4459..53fcda2 100644
--- a/meta/classes/rm_work.bbclass
+++ b/meta/classes/rm_work.bbclass
@@ -6,6 +6,10 @@
 # INHERIT += "rm_work"
 #
 
+# Use the completion scheulder by default when rm_work is active
+# to try and reduce disk usage
+BB_SCHEDULER ?= "completion"
+
 RMWORK_ORIG_TASK := "${BB_DEFAULT_TASK}"
 BB_DEFAULT_TASK = "rm_work_all"
 
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 09/16] utility-tasks: Switch listtasks to use bb.plain() for printing output
  2010-11-28 22:07 [PATCH 00/16] Poky core tweaks Richard Purdie
                   ` (6 preceding siblings ...)
  2010-11-28 14:59 ` [PATCH 08/16] rm_work: Set BB_SCHEDULER as done in OE.dev to ensure disk space is freed sooner rather than at the end of the build Richard Purdie
@ 2010-11-28 15:00 ` Richard Purdie
  2010-11-28 15:01 ` [PATCH 10/16] bitbake: Simplfy pre and post cooker hooks Richard Purdie
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Richard Purdie @ 2010-11-28 15:00 UTC (permalink / raw)
  To: poky

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
---
 meta/classes/utility-tasks.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/meta/classes/utility-tasks.bbclass b/meta/classes/utility-tasks.bbclass
index 3ab37fa..db22973 100644
--- a/meta/classes/utility-tasks.bbclass
+++ b/meta/classes/utility-tasks.bbclass
@@ -7,7 +7,7 @@ python do_listtasks() {
 	# emit the metadata which isnt valid shell
 	for e in d.keys():
 		if bb.data.getVarFlag(e, 'task', d):
-			sys.__stdout__.write("%s\n" % e)
+			bb.plain("%s" % e)
 }
 
 CLEANFUNCS ?= ""
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 10/16] bitbake: Simplfy pre and post cooker hooks
  2010-11-28 22:07 [PATCH 00/16] Poky core tweaks Richard Purdie
                   ` (7 preceding siblings ...)
  2010-11-28 15:00 ` [PATCH 09/16] utility-tasks: Switch listtasks to use bb.plain() for printing output Richard Purdie
@ 2010-11-28 15:01 ` Richard Purdie
  2010-11-28 15:02 ` [PATCH 11/16] font-util: Set RDEPENDS for virtclass-native to exclude encodings to copy DEPENDS Richard Purdie
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Richard Purdie @ 2010-11-28 15:01 UTC (permalink / raw)
  To: poky

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
---
 bitbake/lib/bb/cooker.py        |    9 ++++++---
 bitbake/lib/bb/server/none.py   |    9 ++-------
 bitbake/lib/bb/server/xmlrpc.py |    7 +------
 3 files changed, 9 insertions(+), 16 deletions(-)

diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 33eb65e..054dac8 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -70,7 +70,7 @@ class BBCooker:
         self.bb_cache = None
 
         if server:
-            self.server = server.BitBakeServer(self, self.pre_serve, self.post_serve)
+            self.server = server.BitBakeServer(self)
 
         self.configuration = configuration
 
@@ -925,6 +925,8 @@ class BBCooker:
 
 
 def server_main(cooker, func, *args):
+    cooker.pre_serve()
+
     if cooker.configuration.profile:
         try:
             import cProfile as profile
@@ -956,11 +958,12 @@ def server_main(cooker, func, *args):
 
         print("Raw profiling information saved to profile.log and processed statistics to profile.log.processed")
 
-        return ret
     else:
-        return func(*args)
+        ret = func(*args)
 
+    cooker.post_serve()
 
+    return ret
 
 class CookerExit(bb.event.Event):
     """
diff --git a/bitbake/lib/bb/server/none.py b/bitbake/lib/bb/server/none.py
index 38f713c..dafb2fe 100644
--- a/bitbake/lib/bb/server/none.py
+++ b/bitbake/lib/bb/server/none.py
@@ -109,11 +109,9 @@ class BitBakeServer():
     # remove this when you're done with debugging
     # allow_reuse_address = True
 
-    def __init__(self, cooker, pre_serve, post_serve):
+    def __init__(self, cooker):
         self._idlefuns = {}
         self.commands = BitBakeServerCommands(self, cooker)
-        self.pre_serve = pre_serve
-        self.post_serve = post_serve
 
     def register_idle_function(self, function, data):
         """Register a function to be called while the server is idle"""
@@ -169,10 +167,7 @@ class BitBakeServerFork():
 
 class BitbakeUILauch():
     def launch(self, serverinfo, uifunc, *args):
-        serverinfo.server.pre_serve()
-        ret = bb.cooker.server_main(serverinfo.cooker, uifunc, *args)
-        serverinfo.server.post_serve()
-        return ret
+        return bb.cooker.server_main(serverinfo.cooker, uifunc, *args)
 
 class BitBakeServerConnection():
     def __init__(self, serverinfo):
diff --git a/bitbake/lib/bb/server/xmlrpc.py b/bitbake/lib/bb/server/xmlrpc.py
index 30b83d2..5d3cc3e 100644
--- a/bitbake/lib/bb/server/xmlrpc.py
+++ b/bitbake/lib/bb/server/xmlrpc.py
@@ -87,7 +87,7 @@ class BitBakeServer(SimpleXMLRPCServer):
     # remove this when you're done with debugging
     # allow_reuse_address = True
 
-    def __init__(self, cooker, pre_serve, post_serve, interface = ("localhost", 0)):
+    def __init__(self, cooker, interface = ("localhost", 0)):
         """
         Constructor
         """
@@ -100,8 +100,6 @@ class BitBakeServer(SimpleXMLRPCServer):
         commands = BitBakeServerCommands(self, cooker)
         self.autoregister_all_functions(commands, "")
         self.cooker = cooker
-        self.pre_serve = pre_serve
-        self.post_serve = post_serve
 
     def autoregister_all_functions(self, context, prefix):
         """
@@ -125,8 +123,6 @@ class BitBakeServer(SimpleXMLRPCServer):
         """
         Serve Requests. Overloaded to honor a quit command
         """
-        self.pre_serve()
-
         self.quit = False
         self.timeout = 0 # Run Idle calls for our first callback
         while not self.quit:
@@ -163,7 +159,6 @@ class BitBakeServer(SimpleXMLRPCServer):
             except:
                 pass
 
-        self.post_serve()
         self.server_close()
         return
 
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 11/16] font-util: Set RDEPENDS for virtclass-native to exclude encodings to copy DEPENDS
  2010-11-28 22:07 [PATCH 00/16] Poky core tweaks Richard Purdie
                   ` (8 preceding siblings ...)
  2010-11-28 15:01 ` [PATCH 10/16] bitbake: Simplfy pre and post cooker hooks Richard Purdie
@ 2010-11-28 15:02 ` Richard Purdie
  2010-11-28 15:19 ` [PATCH 12/16] font-alias: Set RDEPENDS to exclude encodings in the native case Richard Purdie
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Richard Purdie @ 2010-11-28 15:02 UTC (permalink / raw)
  To: poky

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
---
 meta/recipes-graphics/xorg-font/font-util_1.2.0.bb |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/meta/recipes-graphics/xorg-font/font-util_1.2.0.bb b/meta/recipes-graphics/xorg-font/font-util_1.2.0.bb
index b9251e1..8f90176 100644
--- a/meta/recipes-graphics/xorg-font/font-util_1.2.0.bb
+++ b/meta/recipes-graphics/xorg-font/font-util_1.2.0.bb
@@ -13,6 +13,7 @@ PACKAGE_ARCH = "${BASE_PACKAGE_ARCH}"
 DEPENDS = "encodings util-macros"
 DEPENDS_virtclass-native = "util-macros-native"
 RDEPENDS = "mkfontdir mkfontscale encodings"
+RDEPENDS_virtclass-native = "mkfontdir-native mkfontscale-native"
 
 PR = "${INC_PR}.0"
 
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 12/16] font-alias: Set RDEPENDS to exclude encodings in the native case
  2010-11-28 22:07 [PATCH 00/16] Poky core tweaks Richard Purdie
                   ` (9 preceding siblings ...)
  2010-11-28 15:02 ` [PATCH 11/16] font-util: Set RDEPENDS for virtclass-native to exclude encodings to copy DEPENDS Richard Purdie
@ 2010-11-28 15:19 ` Richard Purdie
  2010-11-28 15:20 ` [PATCH 13/16] native.bbclasS: Add handing to remap RDEPENDS fields and avoid crossed target and native dependency trees Richard Purdie
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Richard Purdie @ 2010-11-28 15:19 UTC (permalink / raw)
  To: poky

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
---
 .../recipes-graphics/xorg-font/font-alias_1.0.3.bb |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/meta/recipes-graphics/xorg-font/font-alias_1.0.3.bb b/meta/recipes-graphics/xorg-font/font-alias_1.0.3.bb
index 11ad407..667d615 100644
--- a/meta/recipes-graphics/xorg-font/font-alias_1.0.3.bb
+++ b/meta/recipes-graphics/xorg-font/font-alias_1.0.3.bb
@@ -13,6 +13,7 @@ SRC_URI += "file://fix_COPYING_1f8141a5e3b585dfccc748400b05c9c24b41e767.patch"
 
 DEPENDS = "virtual/xserver font-util"
 RDEPENDS = "encodings font-util"
+RDEPENDS_virtclass-native = "font-util"
 
 PE = "1"
 PR = "${INC_PR}.0"
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 13/16] native.bbclasS: Add handing to remap RDEPENDS fields and avoid crossed target and native dependency trees
  2010-11-28 22:07 [PATCH 00/16] Poky core tweaks Richard Purdie
                   ` (10 preceding siblings ...)
  2010-11-28 15:19 ` [PATCH 12/16] font-alias: Set RDEPENDS to exclude encodings in the native case Richard Purdie
@ 2010-11-28 15:20 ` Richard Purdie
  2010-11-28 15:59 ` [PATCH 14/16] bitbake/runqueue: Teach scenequeue about noexec tasks (since they don't do anything we can assume they're always successful Richard Purdie
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Richard Purdie @ 2010-11-28 15:20 UTC (permalink / raw)
  To: poky

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
---
 meta/classes/native.bbclass |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass
index 472f0b6..067b1be 100644
--- a/meta/classes/native.bbclass
+++ b/meta/classes/native.bbclass
@@ -71,8 +71,10 @@ PKG_CONFIG_PATH .= "${EXTRA_NATIVE_PKGCONFIG_PATH}"
 PKG_CONFIG_SYSROOT_DIR = ""
 
 ORIG_DEPENDS := "${DEPENDS}"
+ORIG_RDEPENDS := "${RDEPENDS}"
 
 DEPENDS_virtclass-native ?= "${ORIG_DEPENDS}"
+RDEPENDS_virtclass-native ?= "${ORIG_RDEPENDS}"
 
 python __anonymous () {
     if "native" in (bb.data.getVar('BBCLASSEXTEND', d, True) or ""):
@@ -84,11 +86,21 @@ python __anonymous () {
             if dep.endswith("-cross"):
                 newdeps.append(dep.replace("-cross", "-native"))
             elif not dep.endswith("-native"):
-     
                 newdeps.append(dep + "-native")
             else:
                 newdeps.append(dep)
         bb.data.setVar("DEPENDS_virtclass-native", " ".join(newdeps), d)
+        rdepends = bb.data.getVar("RDEPENDS_virtclass-native", d, True)
+        rdeps = bb.utils.explode_deps(rdepends)
+        newdeps = []
+        for dep in rdeps:
+            if dep.endswith("-cross"):
+                newdeps.append(dep.replace("-cross", "-native"))
+            elif not dep.endswith("-native"):
+                newdeps.append(dep + "-native")
+            else:
+                newdeps.append(dep)
+        bb.data.setVar("RDEPENDS_virtclass-native", " ".join(newdeps), d)
         provides = bb.data.getVar("PROVIDES", d, True)
         for prov in provides.split():
             if prov.find(pn) != -1:
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 14/16] bitbake/runqueue: Teach scenequeue about noexec tasks (since they don't do anything we can assume they're always successful
  2010-11-28 22:07 [PATCH 00/16] Poky core tweaks Richard Purdie
                   ` (11 preceding siblings ...)
  2010-11-28 15:20 ` [PATCH 13/16] native.bbclasS: Add handing to remap RDEPENDS fields and avoid crossed target and native dependency trees Richard Purdie
@ 2010-11-28 15:59 ` Richard Purdie
  2010-11-28 15:59 ` [PATCH 15/16] native.bbclass: Mark various package functions as noexec since they don't do any work Richard Purdie
  2010-11-28 16:17 ` [PATCH 16/16] package-index: Fix after noexec changes Richard Purdie
  14 siblings, 0 replies; 16+ messages in thread
From: Richard Purdie @ 2010-11-28 15:59 UTC (permalink / raw)
  To: poky

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
---
 bitbake/lib/bb/runqueue.py |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index d5c9565..3300db7 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1358,19 +1358,26 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
             sq_hashfn = []
             sq_fn = []
             sq_task = []
+            noexec = []
             for task in range(len(self.sq_revdeps)):
                 realtask = self.rqdata.runq_setscene[task]
                 fn = self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[realtask]]
+                taskname = self.rqdata.runq_task[realtask]
+                taskdep = self.rqdata.dataCache.task_deps[fn]
+                if 'noexec' in taskdep and taskname in taskdep['noexec']:
+                    noexec.append(task)
+                    self.task_skip(task)
+                    continue
                 sq_fn.append(fn)
                 sq_hashfn.append(self.rqdata.dataCache.hashfn[fn])
                 sq_hash.append(self.rqdata.runq_hash[realtask])
-                sq_task.append(self.rqdata.runq_task[realtask])
+                sq_task.append(taskname)
 
             call = self.rq.hashvalidate + "(sq_fn, sq_task, sq_hash, sq_hashfn, d)"
             locs = { "sq_fn" : sq_fn, "sq_task" : sq_task, "sq_hash" : sq_hash, "sq_hashfn" : sq_hashfn, "d" : self.cooker.configuration.data }
             valid = bb.utils.better_eval(call, locs)
             for task in range(len(self.sq_revdeps)):
-                if task not in valid:
+                if task not in valid and task not in noexec:
                     bb.msg.debug(2, bb.msg.domain.RunQueue, "No package found so skipping setscene task %s" % (self.rqdata.get_user_idstring(task)))
                     self.task_failoutright(task)
 
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 15/16] native.bbclass: Mark various package functions as noexec since they don't do any work
  2010-11-28 22:07 [PATCH 00/16] Poky core tweaks Richard Purdie
                   ` (12 preceding siblings ...)
  2010-11-28 15:59 ` [PATCH 14/16] bitbake/runqueue: Teach scenequeue about noexec tasks (since they don't do anything we can assume they're always successful Richard Purdie
@ 2010-11-28 15:59 ` Richard Purdie
  2010-11-28 16:17 ` [PATCH 16/16] package-index: Fix after noexec changes Richard Purdie
  14 siblings, 0 replies; 16+ messages in thread
From: Richard Purdie @ 2010-11-28 15:59 UTC (permalink / raw)
  To: poky

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
---
 meta/classes/native.bbclass |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass
index 067b1be..3ca9d62 100644
--- a/meta/classes/native.bbclass
+++ b/meta/classes/native.bbclass
@@ -112,3 +112,8 @@ python __anonymous () {
         bb.data.setVar("OVERRIDES", bb.data.getVar("OVERRIDES", d, False) + ":virtclass-native", d)
 }
 
+do_package[noexec] = "1"
+do_package_write_ipk[noexec] = "1"
+do_package_write_deb[noexec] = "1"
+do_package_write_rpm[noexec] = "1"
+
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 16/16] package-index: Fix after noexec changes
  2010-11-28 22:07 [PATCH 00/16] Poky core tweaks Richard Purdie
                   ` (13 preceding siblings ...)
  2010-11-28 15:59 ` [PATCH 15/16] native.bbclass: Mark various package functions as noexec since they don't do any work Richard Purdie
@ 2010-11-28 16:17 ` Richard Purdie
  14 siblings, 0 replies; 16+ messages in thread
From: Richard Purdie @ 2010-11-28 16:17 UTC (permalink / raw)
  To: poky

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
---
 meta/recipes-core/meta/package-index.bb |   32 +++++++++++++++---------------
 1 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/meta/recipes-core/meta/package-index.bb b/meta/recipes-core/meta/package-index.bb
index 21822fe..c9e9694 100644
--- a/meta/recipes-core/meta/package-index.bb
+++ b/meta/recipes-core/meta/package-index.bb
@@ -5,25 +5,25 @@ INHIBIT_DEFAULT_DEPS = "1"
 ALLOW_EMPTY = "1"
 PACKAGES = ""
 
-do_fetch() {
-}
-do_unpack() {
-}
-do_patch() {
-}
-do_configure() {
-}
-do_compile() {
-}
-do_install() {
-}
+do_fetch[noexec] = "1"
+do_unpack[noexec] = "1"
+do_patch[noexec] = "1"
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+do_install[noexec] = "1"
+do_package[noexec] = "1"
+do_package_write[noexec] = "1"
+do_package_write_ipk[noexec] = "1"
+do_package_write_rpm[noexec] = "1"
+do_package_write_deb[noexec] = "1"
+do_populate_sysroot[noexec] = "1"
 
-do_build[nostamp] = "1"
-do_build[dirs] = "${DEPLOY_DIR_IPK}"
-do_build() {
+do_package_index[nostamp] = "1"
+do_package_index[dirs] = "${DEPLOY_DIR_IPK}"
+do_package_index() {
 	set -ex
 	package_update_index_ipk
 	set +ex
 }
-
+addtask do_package_index before do_build
 EXCLUDE_FROM_WORLD = "1"
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 00/16] Poky core tweaks
@ 2010-11-28 22:07 Richard Purdie
  2010-11-28 12:07 ` [PATCH 01/16] bitbake/runqueue.py: Fix stamp handling for noexec tasks Richard Purdie
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: Richard Purdie @ 2010-11-28 22:07 UTC (permalink / raw)
  To: poky

I want to start posting my patches here like everyone else does. Whilst 
this time around, I did merge them in future I will not be doing that
giving some time for review. 

This series fixes a number of issues that have either been raised on 
the mailing list or elsewhere and should give some noticable 
performance improvements!

This lets me test out Darren's pull request scripts too!

Pull URL: git://git.pokylinux.org/poky-contrib.git
  Branch: rpurdie/tweaks
  Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=rpurdie/tweaks

Cheers,

Richard

---


Paul Eggleton (1):
  qemu: fix failure to find zlib header files during configure

Richard Purdie (15):
  bitbake/runqueue.py: Fix stamp handling for noexec tasks
  scripts/poky-env-internal/image-swab.bbclass: Remove OEROOT
    references
  scripts/poky-env-internal: Remove unset variables
  scripts/poky-env-internal: Further cleanups
  scripts: Remove obsolete stage-manager scripts
  curl: Fix gnutls option (append ordering was incorrect)
  rm_work: Set BB_SCHEDULER as done in OE.dev to ensure disk space is
    freed sooner rather than at the end of the build
  utility-tasks: Switch listtasks to use bb.plain() for printing output
  bitbake: Simplfy pre and post cooker hooks
  font-util: Set RDEPENDS for virtclass-native to exclude encodings to
    copy DEPENDS
  font-alias: Set RDEPENDS to exclude encodings in the native case
  native.bbclasS: Add handing to remap RDEPENDS fields and avoid
    crossed target and native dependency trees
  bitbake/runqueue: Teach scenequeue about noexec tasks (since they
    don't do anything we can assume they're always successful
  native.bbclass: Mark various package functions as noexec since they
    don't do any work
  package-index: Fix after noexec changes

 bitbake/lib/bb/cooker.py                           |    9 +-
 bitbake/lib/bb/runqueue.py                         |   13 +-
 bitbake/lib/bb/server/none.py                      |    9 +-
 bitbake/lib/bb/server/xmlrpc.py                    |    7 +-
 meta/classes/image-swab.bbclass                    |    2 +-
 meta/classes/native.bbclass                        |   19 +-
 meta/classes/rm_work.bbclass                       |    4 +
 meta/classes/utility-tasks.bbclass                 |    2 +-
 meta/recipes-core/meta/package-index.bb            |   32 +-
 .../qemu/qemu-0.12.4/fix-configure-checks.patch    |   20 +
 meta/recipes-devtools/qemu/qemu_0.12.4.bb          |    3 +-
 .../recipes-graphics/xorg-font/font-alias_1.0.3.bb |    1 +
 meta/recipes-graphics/xorg-font/font-util_1.2.0.bb |    1 +
 meta/recipes-support/curl/curl_7.21.2.bb           |    7 +-
 scripts/poky-env-internal                          |   29 +-
 scripts/stage-manager                              |  156 ---
 scripts/stage-manager-ipkg                         | 1186 --------------------
 scripts/stage-manager-ipkg-build                   |  246 ----
 18 files changed, 97 insertions(+), 1649 deletions(-)
 create mode 100644 meta/recipes-devtools/qemu/qemu-0.12.4/fix-configure-checks.patch
 delete mode 100755 scripts/stage-manager
 delete mode 100755 scripts/stage-manager-ipkg
 delete mode 100755 scripts/stage-manager-ipkg-build



^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2010-11-28 22:16 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-28 22:07 [PATCH 00/16] Poky core tweaks Richard Purdie
2010-11-28 12:07 ` [PATCH 01/16] bitbake/runqueue.py: Fix stamp handling for noexec tasks Richard Purdie
2010-11-28 12:41 ` [PATCH 02/16] scripts/poky-env-internal/image-swab.bbclass: Remove OEROOT references Richard Purdie
2010-11-28 12:57 ` [PATCH 03/16] scripts/poky-env-internal: Remove unset variables Richard Purdie
2010-11-28 13:11 ` [PATCH 04/16] scripts/poky-env-internal: Further cleanups Richard Purdie
2010-11-28 13:14 ` [PATCH 05/16] scripts: Remove obsolete stage-manager scripts Richard Purdie
2010-11-28 14:10 ` [PATCH 06/16] curl: Fix gnutls option (append ordering was incorrect) Richard Purdie
2010-11-28 14:59 ` [PATCH 08/16] rm_work: Set BB_SCHEDULER as done in OE.dev to ensure disk space is freed sooner rather than at the end of the build Richard Purdie
2010-11-28 15:00 ` [PATCH 09/16] utility-tasks: Switch listtasks to use bb.plain() for printing output Richard Purdie
2010-11-28 15:01 ` [PATCH 10/16] bitbake: Simplfy pre and post cooker hooks Richard Purdie
2010-11-28 15:02 ` [PATCH 11/16] font-util: Set RDEPENDS for virtclass-native to exclude encodings to copy DEPENDS Richard Purdie
2010-11-28 15:19 ` [PATCH 12/16] font-alias: Set RDEPENDS to exclude encodings in the native case Richard Purdie
2010-11-28 15:20 ` [PATCH 13/16] native.bbclasS: Add handing to remap RDEPENDS fields and avoid crossed target and native dependency trees Richard Purdie
2010-11-28 15:59 ` [PATCH 14/16] bitbake/runqueue: Teach scenequeue about noexec tasks (since they don't do anything we can assume they're always successful Richard Purdie
2010-11-28 15:59 ` [PATCH 15/16] native.bbclass: Mark various package functions as noexec since they don't do any work Richard Purdie
2010-11-28 16:17 ` [PATCH 16/16] package-index: Fix after noexec changes Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.