[poky] [PATCH 1/1] package_ipk.bbclass: Remove the duplication in PACKAGE_ARCHS.
Lianhao Lu
lianhao.lu at intel.com
Tue Mar 15 01:15:51 PDT 2011
From: Lianhao Lu <lianhao.lu at intel.com>
[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.
Signed-off-by: Lianhao Lu <lianhao.lu at intel.com>
---
meta/classes/package_ipk.bbclass | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index 3c2472b..fbd4ef1 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -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}/'`
--
1.7.0.4
More information about the poky
mailing list