From 1b4c9f6fa0d9a1dfac45d47a54f8490eecee2612 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sun, 12 Aug 2007 11:50:11 +0000 Subject: [PATCH] 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 --- classes/base.bbclass | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/classes/base.bbclass b/classes/base.bbclass index 0be217fce4..5c4ac1d827 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -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 -- 2.39.5