Skip to contentSkip to conversation

Poky core tweaks

PATCH New Richard Purdie 1 participant 16 messages Nov 28, 2010

lore
Share & tools
lore
#0 lore raw

cover Poky core tweaks

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
#1 lore raw

PATCH 1/16 bitbake/runqueue.py: Fix stamp handling for noexec tasks

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

---
 bitbake/lib/bb/runqueue.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
bitbake/lib/bb/runqueue.py +1 -1
index 85ecafc..d5c9565 100644
@@ -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
 
Signature · 1 line
1.7.0.4
#2 lore raw

PATCH 2/16 scripts/poky-env-internal/image-swab.bbclass: Remove OEROOT references

In reply to Richard Purdie

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

---
 meta/classes/image-swab.bbclass |    2 +-
 scripts/poky-env-internal       |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
meta/classes/image-swab.bbclass +1 -1
index 93918bf..554867b 100644
@@ -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
scripts/poky-env-internal +3 -3
index ae26cab..756d18c 100755
@@ -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"
Signature · 1 line
1.7.0.4
#4 lore raw

PATCH 4/16 scripts/poky-env-internal: Further cleanups

In reply to Richard Purdie
---
 scripts/poky-env-internal |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)
scripts/poky-env-internal +9 -8
index 6bdb8df..5b206ed 100755
@@ -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"
Signature · 1 line
1.7.0.4
#6 lore raw

PATCH 6/16 curl: Fix gnutls option (append ordering was incorrect)

In reply to Richard Purdie
---
 meta/recipes-support/curl/curl_7.21.2.bb |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
meta/recipes-support/curl/curl_7.21.2.bb +4 -3
index fd1d5dd..3208baf 100644
@@ -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
Signature · 1 line
1.7.0.4
#9 lore raw

PATCH 10/16 bitbake: Simplfy pre and post cooker hooks

In reply to Richard Purdie
---
 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(-)
bitbake/lib/bb/cooker.py +6 -3
index 33eb65e..054dac8 100644
@@ -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):
     """
bitbake/lib/bb/server/none.py +2 -7
index 38f713c..dafb2fe 100644
@@ -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):
bitbake/lib/bb/server/xmlrpc.py +1 -6
index 30b83d2..5d3cc3e 100644
@@ -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
 
Signature · 1 line
1.7.0.4
#3 lore raw

PATCH 3/16 scripts/poky-env-internal: Remove unset variables

In reply to Richard Purdie

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.

---
 scripts/poky-env-internal |   10 ----------
 1 files changed, 0 insertions(+), 10 deletions(-)
scripts/poky-env-internal +0 -10
index 756d18c..6bdb8df 100755
@@ -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
 
Signature · 1 line
1.7.0.4
#14 lore raw

PATCH 15/16 native.bbclass: Mark various package functions as noexec since they don't do any work

In reply to Richard Purdie
---
 meta/classes/native.bbclass |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
meta/classes/native.bbclass +5 -0
index 067b1be..3ca9d62 100644
@@ -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"
+
Signature · 1 line
1.7.0.4
#5 lore raw

PATCH 5/16 scripts: Remove obsolete stage-manager scripts

In reply to Richard Purdie
---
 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
scripts/stage-manager deleted +0 -156
deleted file mode 100755
index 536d1af..0000000
@@ -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)
-
-
-
scripts/stage-manager-ipkg deleted +0 -1186

1,186 lines not on this page · raw message

scripts/stage-manager-ipkg-build deleted +0 -246

246 lines not on this page · raw message

Signature · 1 line
1.7.0.4
#7 lore raw

PATCH 8/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

In reply to Richard Purdie
---
 meta/classes/rm_work.bbclass |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
meta/classes/rm_work.bbclass +4 -0
index 87c4459..53fcda2 100644
@@ -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"
 
Signature · 1 line
1.7.0.4
#8 lore raw

PATCH 9/16 utility-tasks: Switch listtasks to use bb.plain() for printing output

In reply to Richard Purdie
---
 meta/classes/utility-tasks.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
meta/classes/utility-tasks.bbclass +1 -1
index 3ab37fa..db22973 100644
@@ -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 ?= ""
Signature · 1 line
1.7.0.4
#10 lore raw

PATCH 11/16 font-util: Set RDEPENDS for virtclass-native to exclude encodings to copy DEPENDS

In reply to Richard Purdie
---
 meta/recipes-graphics/xorg-font/font-util_1.2.0.bb |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
meta/recipes-graphics/xorg-font/font-util_1.2.0.bb +1 -0
index b9251e1..8f90176 100644
@@ -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"
 
Signature · 1 line
1.7.0.4
#11 lore raw

PATCH 12/16 font-alias: Set RDEPENDS to exclude encodings in the native case

In reply to Richard Purdie
---
 .../recipes-graphics/xorg-font/font-alias_1.0.3.bb |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
meta/recipes-graphics/xorg-font/font-alias_1.0.3.bb +1 -0
index 11ad407..667d615 100644
@@ -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"
Signature · 1 line
1.7.0.4
#12 lore raw

PATCH 13/16 native.bbclasS: Add handing to remap RDEPENDS fields and avoid crossed target and native dependency trees

In reply to Richard Purdie
---
 meta/classes/native.bbclass |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)
meta/classes/native.bbclass +13 -1
index 472f0b6..067b1be 100644
@@ -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:
Signature · 1 line
1.7.0.4
#13 lore raw

PATCH 14/16 bitbake/runqueue: Teach scenequeue about noexec tasks (since they don't do anything we can assume they're always successful

In reply to Richard Purdie
---
 bitbake/lib/bb/runqueue.py |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)
bitbake/lib/bb/runqueue.py +9 -2
index d5c9565..3300db7 100644
@@ -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)
 
Signature · 1 line
1.7.0.4
#15 lore raw

PATCH 16/16 package-index: Fix after noexec changes

In reply to Richard Purdie
---
 meta/recipes-core/meta/package-index.bb |   32 +++++++++++++++---------------
 1 files changed, 16 insertions(+), 16 deletions(-)
meta/recipes-core/meta/package-index.bb +16 -16
index 21822fe..c9e9694 100644
@@ -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"
Signature · 1 line
1.7.0.4