[oe-commits] Tom Rini : packaged-staging: Fix libtool-cross staging

git version control git at git.openembedded.org
Mon Sep 13 16:01:01 UTC 2010


Module: openembedded.git
Branch: org.openembedded.dev
Commit: f87759ae52f2a66be98d3f4104265ec36f62f071
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=f87759ae52f2a66be98d3f4104265ec36f62f071

Author: Tom Rini <tom_rini at mentor.com>
Date:   Thu Sep  9 09:06:56 2010 -0700

packaged-staging: Fix libtool-cross staging

libtool-cross must not inherit cross, so wasn't getting the right
mangling and saving done.  In addition, we want a slightly broader grep
to be used in these cases.

Signed-off-by: Tom Rini <tom_rini at mentor.com>

---

 classes/packaged-staging.bbclass |   33 +++++++++++++++++++++++----------
 1 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/classes/packaged-staging.bbclass b/classes/packaged-staging.bbclass
index 58d336a..8292853 100644
--- a/classes/packaged-staging.bbclass
+++ b/classes/packaged-staging.bbclass
@@ -30,16 +30,8 @@ BB_STAMP_WHITELIST = "${PSTAGE_NATIVEDEPENDS}"
 
 python __anonymous() {
     pstage_allowed = True
-
-    # We need PSTAGE_PKGARCH to contain information about the target.
-    if bb.data.inherits_class('cross', d):
-        bb.data.setVar('PSTAGE_PKGARCH', "${HOST_SYS}-${PACKAGE_ARCH}-${TARGET_OS}", d)
-
-    # These classes encode staging paths data files so we must mangle them
-    # for reuse.
-    if bb.data.inherits_class('native', d) or bb.data.inherits_class('nativesdk', d) or bb.data.inherits_class('cross', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('sdk', d):
-        scan_cmd = "grep -Irl ${STAGING_DIR} ${PSTAGE_TMPDIR_STAGE}"
-        bb.data.setVar('PSTAGE_SCAN_CMD', scan_cmd, d)
+    pstage_host_mangle = False
+    pstage_is_cross = False
 
     # PSTAGE_NATIVEDEPENDS lists the packages we need before we can use
     # packaged staging. There will always be some packages we depend on.
@@ -59,6 +51,27 @@ python __anonymous() {
     if localdata.getVar('PSTAGING_DISABLED', True) == "1":
         pstage_allowed = False
 
+    # libtool-cross does not inherit cross.
+    if localdata.getVar('PN', True).startswith("libtool-cross"):
+        pstage_host_mangle = True
+        pstage_is_cross = True
+
+    # We need PSTAGE_PKGARCH to contain information about the target.
+    if bb.data.inherits_class('cross', d):
+        pstage_host_mangle = True
+
+    if pstage_host_mangle:
+        bb.data.setVar('PSTAGE_PKGARCH', "${HOST_SYS}-${PACKAGE_ARCH}-${TARGET_OS}", d)
+
+    # These classes encode staging paths data files so we must mangle them
+    # for reuse.
+    if bb.data.inherits_class('native', d) or bb.data.inherits_class('nativesdk', d) or bb.data.inherits_class('cross', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('sdk', d):
+        pstage_is_cross = True
+
+    if pstage_is_cross:
+        scan_cmd = "grep -Irl ${TMPDIR} ${PSTAGE_TMPDIR_STAGE}"
+        bb.data.setVar('PSTAGE_SCAN_CMD', scan_cmd, d)
+
     # Add task dependencies if we're active, otherwise mark packaged staging
     # as inactive.
     if pstage_allowed:





More information about the Openembedded-commits mailing list