[oe-commits] org.oe.dev base.bbclass: Cleanups possible with recent improvements in bitbake syntax

rpurdie commit openembedded-commits at lists.openembedded.org
Sat Feb 23 19:56:47 UTC 2008


base.bbclass: Cleanups possible with recent improvements in bitbake syntax

Author: rpurdie at openembedded.org
Branch: org.openembedded.dev
Revision: 52d44d4b04042b5bd0f0f811fb3a9e919c652df3
ViewMTN: http://monotone.openembedded.org/revision/info/52d44d4b04042b5bd0f0f811fb3a9e919c652df3
Files:
1
classes/base.bbclass
Diffs:

#
# mt diff -r541070a08e3de6d0794e2b95cefda0658762a58b -r52d44d4b04042b5bd0f0f811fb3a9e919c652df3
#
# 
# 
# patch "classes/base.bbclass"
#  from [b9e3242f33b6557cb0a7ae902cf31b9a284c1db3]
#    to [d416d69e08d5817491757b1b092d6943774c231c]
# 
============================================================
--- classes/base.bbclass	b9e3242f33b6557cb0a7ae902cf31b9a284c1db3
+++ classes/base.bbclass	d416d69e08d5817491757b1b092d6943774c231c
@@ -85,7 +85,7 @@ def base_dep_prepend(d):
 
 
 def base_dep_prepend(d):
-	import bb;
+	import bb
 	#
 	# Ideally this will check a flag so we will operate properly in
 	# the case where host == build == target, for now we don't work in
@@ -814,6 +814,20 @@ python read_subpackage_metadata () {
 			bb.data.setVar(key, sdata[key], d)
 }
 
+# Make sure MACHINE isn't exported
+# (breaks binutils at least)
+MACHINE[unexport] = "1"
+
+# Make sure TARGET_ARCH isn't exported
+# (breaks Makefiles using implicit rules, e.g. quilt, as GNU make has this 
+# in them, undocumented)
+TARGET_ARCH[unexport] = "1"
+
+# Make sure DISTRO isn't exported
+# (breaks sysvinit at least)
+DISTRO[unexport] = "1"
+
+
 def base_after_parse(d):
     import bb, os, exceptions
 
@@ -833,8 +847,6 @@ def base_after_parse(d):
             if this_machine and not re.match(need_machine, this_machine):
                 raise bb.parse.SkipPackage("incompatible with machine %s" % this_machine)
 
-
-
     pn = bb.data.getVar('PN', d, 1)
 
     # OBSOLETE in bitbake 1.7.4
@@ -846,22 +858,6 @@ def base_after_parse(d):
     if use_nls != None:
         bb.data.setVar('USE_NLS', use_nls, d)
 
-    # Make sure MACHINE isn't exported
-    # (breaks binutils at least)
-    bb.data.delVarFlag('MACHINE', 'export', d)
-    bb.data.setVarFlag('MACHINE', 'unexport', 1, d)
-    
-    # Make sure TARGET_ARCH isn't exported
-    # (breaks Makefiles using implicit rules, e.g. quilt, as GNU make has this 
-    # in them, undocumented)
-    bb.data.delVarFlag('TARGET_ARCH', 'export', d)
-    bb.data.setVarFlag('TARGET_ARCH', 'unexport', 1, d)
-    
-    # Make sure DISTRO isn't exported
-    # (breaks sysvinit at least)
-    bb.data.delVarFlag('DISTRO', 'export', d)
-    bb.data.setVarFlag('DISTRO', 'unexport', 1, d)
-
     # Git packages should DEPEND on git-native
     srcuri = bb.data.getVar('SRC_URI', d, 1)
     if "git://" in srcuri:
@@ -891,7 +887,7 @@ def base_after_parse(d):
     if len(paths) == 0:
         return
 
-    for s in bb.data.getVar('SRC_URI', d, 1).split():
+    for s in srcuri.split():
         if not s.startswith("file://"):
             continue
         local = bb.data.expand(bb.fetch.localpath(s, d), d)






More information about the Openembedded-commits mailing list