* [PATCH 0/1] Fixing do_rootfs_ipk failure
@ 2011-03-15 8:15 Lianhao Lu
2011-03-15 8:15 ` [PATCH 1/1] package_ipk.bbclass: Remove the duplication in PACKAGE_ARCHS Lianhao Lu
2011-03-15 21:15 ` [PATCH 0/1] Fixing do_rootfs_ipk failure Richard Purdie
0 siblings, 2 replies; 3+ messages in thread
From: Lianhao Lu @ 2011-03-15 8:15 UTC (permalink / raw)
To: poky
From: Lianhao Lu <lianhao.lu@intel.com>
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 <lianhao.lu@intel.com>
---
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(-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] package_ipk.bbclass: Remove the duplication in PACKAGE_ARCHS.
2011-03-15 8:15 [PATCH 0/1] Fixing do_rootfs_ipk failure Lianhao Lu
@ 2011-03-15 8:15 ` Lianhao Lu
2011-03-15 21:15 ` [PATCH 0/1] Fixing do_rootfs_ipk failure Richard Purdie
1 sibling, 0 replies; 3+ messages in thread
From: Lianhao Lu @ 2011-03-15 8:15 UTC (permalink / raw)
To: poky
From: Lianhao Lu <lianhao.lu@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@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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 0/1] Fixing do_rootfs_ipk failure
2011-03-15 8:15 [PATCH 0/1] Fixing do_rootfs_ipk failure Lianhao Lu
2011-03-15 8:15 ` [PATCH 1/1] package_ipk.bbclass: Remove the duplication in PACKAGE_ARCHS Lianhao Lu
@ 2011-03-15 21:15 ` Richard Purdie
1 sibling, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2011-03-15 21:15 UTC (permalink / raw)
To: Lianhao Lu; +Cc: poky
On Tue, 2011-03-15 at 16:15 +0800, Lianhao Lu wrote:
> From: Lianhao Lu <lianhao.lu@intel.com>
>
> 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 <lianhao.lu@intel.com>
> ---
>
>
> 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(-)
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-03-15 21:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-15 8:15 [PATCH 0/1] Fixing do_rootfs_ipk failure Lianhao Lu
2011-03-15 8:15 ` [PATCH 1/1] package_ipk.bbclass: Remove the duplication in PACKAGE_ARCHS Lianhao Lu
2011-03-15 21:15 ` [PATCH 0/1] Fixing do_rootfs_ipk failure Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox