]> code.ossystems Code Review - openembedded-core.git/commitdiff
package.bbclass: Ensure task's variable dependencies are correctly caputred in the...
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 30 Aug 2011 13:22:21 +0000 (14:22 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 31 Aug 2011 18:29:45 +0000 (19:29 +0100)
[YOCTO #1388]

This change is needed to correctly add the dependencies for the do_package
task which bitbake is unable to automatically detect itself.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/multilib.bbclass
meta/classes/package.bbclass

index 286b806cf0374bd1f5dbd16757a05ddd115929bf..5d975fd33e1e529a78e3f01e217cc51c645e634d 100644 (file)
@@ -72,8 +72,9 @@ python __anonymous () {
 
     d.setVar("PACKAGES", " ".join([row[1] for row in pkgs_mapping]))
 
+    vars = (d.getVar("PACKAGEVARS", True) or "").split()
     for pkg_mapping in pkgs_mapping:
-        for subs in ["FILES", "RDEPENDS", "RRECOMMENDS", "SUMMARY", "DESCRIPTION", "RSUGGESTS", "RPROVIDES", "RCONFLICTS", "PKG", "ALLOW_EMPTY", "pkg_postinst", "pkg_postrm", "INITSCRIPT_NAME", "INITSCRIPT_PARAMS"]:
+        for subs in vars:
             d.renameVar("%s_%s" % (subs, pkg_mapping[0]), "%s_%s" % (subs, pkg_mapping[1]))
 
     map_dependencies("DEPENDS", d)
index 15c414274f6e64c63719d0f74ae3e25c2cd995a9..73e8f6365f6d55801fd4800f37f40b88ee77168b 100644 (file)
@@ -1620,6 +1620,19 @@ python package_depchains() {
                                pkg_addrrecs(pkg, base, suffix, func, rdeps, d)
 }
 
+# Since bitbake can't determine which variables are accessed during package 
+# iteration, we need to list them here:
+PACKAGEVARS = "FILES RDEPENDS RRECOMMENDS SUMMARY DESCRIPTION RSUGGESTS RPROVIDES RCONFLICTS PKG ALLOW_EMPTY pkg_postinst pkg_postrm INITSCRIPT_NAME INITSCRIPT_PARAMS"
+
+def gen_packagevar(d):
+    ret = []
+    pkgs = (d.getVar("PACKAGES", True) or "").split()
+    vars = (d.getVar("PACKAGEVARS", True) or "").split()
+    for p in pkgs:
+        for v in vars:
+            ret.append(v + "_" + p)
+    return " ".join(ret)
+
 PACKAGE_PREPROCESS_FUNCS ?= ""
 PACKAGEFUNCS ?= "package_get_auto_pr \ 
                 perform_packagecopy \
@@ -1656,6 +1669,7 @@ python do_package () {
 }
 
 do_package[dirs] = "${SHLIBSWORKDIR} ${PKGDESTWORK} ${D}"
+do_package[vardeps] += "${PACKAGEFUNCS} ${@gen_packagevar(d)}"
 addtask package before do_build after do_install
 
 PACKAGELOCK = "${STAGING_DIR}/package-output.lock"