Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: openembedded-core <openembedded-core@lists.openembedded.org>
Subject: [PATCH] package.bbclass: Ensure task's variable dependencies are correctly caputred in the sstate checksum
Date: Tue, 30 Aug 2011 14:38:06 +0100	[thread overview]
Message-ID: <1314711486.5939.354.camel@rex> (raw)

[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>
---
diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass
index 66d6450..342cb29 100644
--- a/meta/classes/multilib.bbclass
+++ b/meta/classes/multilib.bbclass
@@ -88,8 +88,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)
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 15c4142..73e8f63 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -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"





                 reply	other threads:[~2011-08-30 13:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1314711486.5939.354.camel@rex \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox