Fixing do_rootfs_ipk failure
cover Fixing do_rootfs_ipk failure
From: Lianhao Lu <[email protected]>
This patch fixes Bug #870. It removes the duplicated values in PACKAGE_ARCHS which would results an error in opkg-cl.
Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: llu/bug870
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=llu/bug870
Thanks,
Lianhao Lu <[email protected]>
---
Lianhao Lu (1):
package_ipk.bbclass: Remove the duplication in PACKAGE_ARCHS.
meta/classes/package_ipk.bbclass | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-)
PATCH 1/1 package_ipk.bbclass: Remove the duplication in PACKAGE_ARCHS.
From: Lianhao Lu <[email protected]>
[YOCTO #870] Remove the duplicated values in PACKAGE_ARCHS, so the opkg-cl wouldn't report errors of duplicate src declaration which results the do_rootfs failure.
--- meta/classes/package_ipk.bbclass | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-)
meta/classes/package_ipk.bbclass +14 -2
@@ -150,6 +150,17 @@ package_update_index_ipk () { done } +def package_unique_archs_ipk (d): + unique_archs = [] + ipkg_archs = bb.data.getVar('PACKAGE_ARCHS',d,True) + + for arch in ipkg_archs.split(): + if not arch in unique_archs: + unique_archs.append(arch) + + return " ".join(unique_archs) + +PACKAGE_ARCHS_UNIQUE_IPK = "${@package_unique_archs_ipk(d)}" # # Generate an ipkg conf file ${IPKGCONF_TARGET} suitable for use against # the target system and an ipkg conf file ${IPKGCONF_SDK} suitable for
@@ -159,7 +170,7 @@ package_generate_ipkg_conf () { package_generate_archlist echo "src oe file:${DEPLOY_DIR_IPK}" >> ${IPKGCONF_TARGET} echo "src oe file:${DEPLOY_DIR_IPK}" >> ${IPKGCONF_SDK} - ipkgarchs="${PACKAGE_ARCHS}" + ipkgarchs="${PACKAGE_ARCHS_UNIQUE_IPK}" for arch in $ipkgarchs; do if [ -e ${DEPLOY_DIR_IPK}/$arch/Packages ] ; then echo "src oe-$arch file:${DEPLOY_DIR_IPK}/$arch" >> ${IPKGCONF_TARGET}
@@ -176,7 +187,8 @@ package_generate_ipkg_conf () { } package_generate_archlist () { - ipkgarchs="${PACKAGE_ARCHS}" + ipkgarchs="${PACKAGE_ARCHS_UNIQUE_IPK}" + priority=1 for arch in $ipkgarchs; do sdkarch=`echo $arch | sed -e 's/${HOST_ARCH}/${SDK_ARCH}/'`
Signature · 1 line
1.7.0.4
Quoted 13 lines · Lianhao Lu
From: Lianhao Lu <[email protected]>
This patch fixes Bug #870. It removes the duplicated values in
PACKAGE_ARCHSwhich would results an error in opkg-cl.Pull URL:
git://git.pokylinux.org/poky-contrib.git
Branch: llu/bug870
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=llu/bug870Thanks,
Lianhao Lu <[email protected]>
---
Quoted 5 lines
Lianhao Lu (1):
package_ipk.bbclass: Remove the duplication inPACKAGE_ARCHS.meta/classes/package_ipk.bbclass | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-)
Whilst this patch is good, it papers over the underlying problem as that variable should never have duplicates in it. For that reason I don't want to merge it but fix that issue instead. There are two things we should do here:
a) Merge a fix to remove the duplication (I've done this with a quick hacky workaround and proposed a better one on the OE Core list as it needs discussion)
b) Add a sanity test for the PACKAGE_ARCHS variable to detect this problem in the future.
Cheers,
Richard