Fix overriding PACKAGE_ARCH for MACHINE specific SRC_URI [v2]
cover Fix overriding PACKAGE_ARCH for MACHINE specific SRC_URI [v2]
This series includes a fix for base.bbclass so that PACKAGE_ARCH is correctly set to MACHINE_ARCH for all recipes which include a MACHINE OVERRIDE in SRC_URI.
Cheers,
Joshua
The following changes since commit d4ffe12ca36bf10be4e0f9565d7c3d8e6f4a265a:
iputils: Add base_libdir to VPATH in order to find the crypto library (2012-02-21 17:59:21 +0000)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib josh/work
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=josh/work
Joshua Lock (3):
base.bbclass: check all entries of FILESPATH for MACHINE overrides
external-csl-toolchain: skip parsing if CSL_VER_MAIN isn't set
netbase: remove redundant assignments
meta/classes/base.bbclass | 14 ++++++++------ meta/recipes-core/meta/external-csl-toolchain.bb | 8 ++++++++ meta/recipes-core/netbase/netbase_4.47.bb | 4 ---- 3 files changed, 16 insertions(+), 10 deletions(-)
Signature · 1 line
1.7.7.6
PATCH 1/3 base.bbclass: check all entries of FILESPATH for MACHINE overrides
The logic which looks for MACHINE overrides in SRC_URI and updates PACKAGE_ARCH was checking only certain subdirectories of the recipes parent which, amongst other issues, doesn't account for SRC_URI overrides in layers.
This patch changes the logic such that all FILESPATH entries are checked for children named for MACHINE.
--- meta/classes/base.bbclass | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-)
meta/classes/base.bbclass +8 -6
@@ -453,13 +453,15 @@ python () { # We always try to scan SRC_URI for urls with machine overrides # unless the package sets SRC_URI_OVERRIDES_PACKAGE_ARCH=0 # - override = d.getVar('SRC_URI_OVERRIDES_PACKAGE_ARCH', 1) + override = d.getVar('SRC_URI_OVERRIDES_PACKAGE_ARCH', True) if override != '0': paths = [] - for p in [ "${PF}", "${P}", "${PN}", "files", "" ]: - path = bb.data.expand(os.path.join("${FILE_DIRNAME}", p, "${MACHINE}"), d) - if os.path.isdir(path): - paths.append(path) + fpaths = (d.getVar('FILESPATH', True) or '').split(':') + machine = d.getVar('MACHINE', True) + for p in fpaths: + if os.path.basename(p) == machine and os.path.isdir(p): + paths.append(p) + if len(paths) != 0: for s in srcuri.split(): if not s.startswith("file://"):
@@ -468,7 +470,7 @@ python () { local = fetcher.localpath(s) for mp in paths: if local.startswith(mp): - #bb.note("overriding PACKAGE_ARCH from %s to %s" % (pkg_arch, mach_arch)) + #bb.note("overriding PACKAGE_ARCH from %s to %s for %s" % (pkg_arch, mach_arch, pn)) d.setVar('PACKAGE_ARCH', "${MACHINE_ARCH}") return
Signature · 1 line
1.7.7.6
PATCH 2/3 external-csl-toolchain: skip parsing if CSL_VER_MAIN isn't set
In reply to Joshua Lock--- meta/recipes-core/meta/external-csl-toolchain.bb | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
meta/recipes-core/meta/external-csl-toolchain.bb +8 -0
@@ -150,3 +150,11 @@ FILES_linux-libc-headers = "${includedir}/asm* \ " FILES_gdbserver = "${bindir}/gdbserver ${libdir}/bin/sysroot-gdbserver" FILES_gdbserver-dbg = "${bindir}/.debug/gdbserver" + +CSL_VER_MAIN ??= "" + +python () { + if not d.getVar("CSL_VER_MAIN"): + raise bb.parse.SkipPackage("External CSL toolchain not configured (CSL_VER_MAIN not set).") +} +
Signature · 1 line
1.7.7.6
PATCH 3/3 netbase: remove redundant assignments
In reply to Joshua LockThere's no need to explicitly set PACKAGE_ARCH = MACHINE_ARCH, base.bbclass takes care of setting this value for us based on the interfaces for those machines being an OVERRIDE.
--- meta/recipes-core/netbase/netbase_4.47.bb | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-)
meta/recipes-core/netbase/netbase_4.47.bb +0 -4
@@ -47,7 +47,3 @@ do_install () { } CONFFILES_${PN} = "${sysconfdir}/hosts ${sysconfdir}/network/interfaces" - -PACKAGE_ARCH_qemuarm = "${MACHINE_ARCH}" -PACKAGE_ARCH_qemux86 = "${MACHINE_ARCH}" -PACKAGE_ARCH_qemux86-64 = "${MACHINE_ARCH}"
Signature · 1 line
1.7.7.6
Richard Purdie
AppliedQuoted 10 lines · Joshua Lock
This series includes a fix for base.bbclass so that
PACKAGE_ARCHis correctly set toMACHINE_ARCHfor all recipes which include a MACHINE OVERRIDE inSRC_URI.Cheers,
JoshuaThe following changes since commit
d4ffe12ca36bf10be4e0f9565d7c3d8e6f4a265a:iputils: Add
base_libdirto VPATH in order to find the crypto library (2012-02-21 17:59:21 +0000)
Quoted 8 lines
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contribjosh/work
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=josh/workJoshua Lock (3):
base.bbclass: check all entries of FILESPATH for MACHINE overrides
external-csl-toolchain: skip parsing ifCSL_VER_MAINisn't set
netbase: remove redundant assignments
Merged to master, thanks.
Richard