[oe-commits] org.oe.dev base.bbclass: Optimise the SRC_URI_OVERRIDES_PACKAGE_ARCH code so localpath is only called if its possible there are machine override matches. Also document some code hiding bugs for post 1.8.8 removal

rpurdie commit openembedded-commits at lists.openembedded.org
Sun Aug 12 11:55:06 UTC 2007


base.bbclass: Optimise the SRC_URI_OVERRIDES_PACKAGE_ARCH code so localpath is only called if its possible there are machine override matches. Also document some code hiding bugs for post 1.8.8 removal

Author: rpurdie at openembedded.org
Branch: org.openembedded.dev
Revision: e8982cdc8b0d0cf6cf94aea098c9a0fbc36f6a41
ViewMTN: http://monotone.openembedded.org/revision.psp?id=e8982cdc8b0d0cf6cf94aea098c9a0fbc36f6a41
Files:
1
classes/base.bbclass
Diffs:

#
# mt diff -r2aa5f6c6ddeadcd469eb439112a22cc38eaa5be3 -re8982cdc8b0d0cf6cf94aea098c9a0fbc36f6a41
#
# 
# 
# patch "classes/base.bbclass"
#  from [5fb012c81131f41fbf0fed66976513d338e42b56]
#    to [46c6040d209595895d573d152a08aa27a11b5516]
# 
============================================================
--- classes/base.bbclass	5fb012c81131f41fbf0fed66976513d338e42b56
+++ classes/base.bbclass	46c6040d209595895d573d152a08aa27a11b5516
@@ -586,6 +586,8 @@ python base_do_unpack() {
 		except bb.MalformedUrl, e:
 			raise FuncFailed('Unable to generate local path for malformed uri: %s' % e)
 		# dont need any parameters for extraction, strip them off
+		# RP: Insane. localpath shouldn't have parameters
+		# RP: Scehdule for removal with bitbake 1.8.8
 		local = re.sub(';.*$', '', local)
 		local = os.path.realpath(local)
 		ret = oe_unpack_file(local, localdata, url)
@@ -858,6 +860,12 @@ def base_after_parse(d):
     paths = []
     for p in [ "${PF}", "${P}", "${PN}", "files", "" ]:
         paths.append(bb.data.expand(os.path.join("${FILE_DIRNAME}", p, "${MACHINE}"), d))
+        path = bb.data.expand(os.path.join("${FILE_DIRNAME}", p, "${MACHINE}"), d)
+        if os.path.isdir(path):
+            paths.append(path)
+    if len(paths) == 0:
+        return
+
     for s in bb.data.getVar('SRC_URI', d, 1).split():
         if not s.startswith("file://"):
             continue






More information about the Openembedded-commits mailing list