summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/base.bbclass19
1 files changed, 12 insertions, 7 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 5d26c2b7ed..643b9f429e 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -845,23 +845,28 @@ def base_after_parse(d):
845 if (old_arch == mach_arch): 845 if (old_arch == mach_arch):
846 # Nothing to do 846 # Nothing to do
847 return 847 return
848
849 #
850 # We always try to scan SRC_URI for urls with machine overrides
851 # unless the package sets SRC_URI_OVERRIDES_PACKAGE_ARCH=0
852 #
848 override = bb.data.getVar('SRC_URI_OVERRIDES_PACKAGE_ARCH', d, 1) 853 override = bb.data.getVar('SRC_URI_OVERRIDES_PACKAGE_ARCH', d, 1)
849 854 if override == '0':
850 if not override or override == '0':
851 return 855 return
852 856
853 paths = [] 857 paths = []
854 for p in [ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ]: 858 for p in [ "${PF}", "${P}", "${PN}", "files", "" ]:
855 paths.append(bb.data.expand(os.path.join(p, mach_arch), d)) 859 paths.append(bb.data.expand(os.path.join("${FILE_DIRNAME}", p, "${MACHINE}"), d))
856 for s in bb.data.getVar('SRC_URI', d, 1).split(): 860 for s in bb.data.getVar('SRC_URI', d, 1).split():
861 if not s.startswith("file://"):
862 continue
857 local = bb.data.expand(bb.fetch.localpath(s, d), d) 863 local = bb.data.expand(bb.fetch.localpath(s, d), d)
858 for mp in paths: 864 for mp in paths:
859 if local.startswith(mp): 865 if local.startswith(mp):
860 #bb.note("overriding PACKAGE_ARCH from %s to %s" % (old_arch, mach_arch)) 866 #bb.note("overriding PACKAGE_ARCH from %s to %s" % (old_arch, mach_arch))
861 bb.data.setVar('PACKAGE_ARCH', mach_arch, d) 867 bb.data.setVar('PACKAGE_ARCH', "${MACHINE_ARCH}", d)
862 return 868 return
863 869
864
865python () { 870python () {
866 base_after_parse_two(d) 871 base_after_parse_two(d)
867 base_after_parse(d) 872 base_after_parse(d)