Patchwork [1/1] tune-core2.inc: PACKAGE_EXTRA_ARCHS causes wrong packages install into image

login
register
mail settings
Submitter Robert Yang
Date May 22, 2012, 10:15 a.m.
Message ID <dc94c1bb359b466c779a11fd8559851a8c6ea5d2.1337681343.git.liezhi.yang@windriver.com>
Download mbox | patch
Permalink /patch/28257/
State New
Headers show

Comments

Robert Yang - May 22, 2012, 10:15 a.m.
There is a bug if we:
1) bitbake diffutils with MACHINE=crownbay
2) bitbake diffutils with MACHINE=qemux86
3) bitbake core-image-sato with MACHINE=crownbay

Then the diffutils.i586 would be installed to the crownbay's image, this
is because diffutils.i586 is newer than diffutils.core2, both of
deploy/rpm/i586 and deploy/rpm/core2 are in the dbpath, so rpm will
select the newer one (diffutils.i586). This caused by:

PACKAGE_EXTRA_ARCHS_tune-core2 = "${PACKAGE_EXTRA_ARCHS_tune-x86} i386 i486 i586 i686 core2"

The PACKAGE_EXTRA_ARCHS will cause the deploy/rpm/i586 in the crownbay's
dbpath, so any pkg which is needed by the image of both crownbay and
qemux86, if the i586 one is newer than the core2, it would be installed
into crownbay's image.

This is for yocto 1.2.1, if it is OK, I think the master branch also
needs it.

[YOCTO #2360]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/conf/machine/include/tune-core2.inc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Koen Kooi - May 22, 2012, 10:30 a.m.
Op 22 mei 2012, om 12:15 heeft Robert Yang het volgende geschreven:

> There is a bug if we:
> 1) bitbake diffutils with MACHINE=crownbay
> 2) bitbake diffutils with MACHINE=qemux86
> 3) bitbake core-image-sato with MACHINE=crownbay
> 
> Then the diffutils.i586 would be installed to the crownbay's image, this
> is because diffutils.i586 is newer than diffutils.core2, both of
> deploy/rpm/i586 and deploy/rpm/core2 are in the dbpath, so rpm will
> select the newer one (diffutils.i586). This caused by:
> 
> PACKAGE_EXTRA_ARCHS_tune-core2 = "${PACKAGE_EXTRA_ARCHS_tune-x86} i386 i486 i586 i686 core2"
> 
> The PACKAGE_EXTRA_ARCHS will cause the deploy/rpm/i586 in the crownbay's
> dbpath, so any pkg which is needed by the image of both crownbay and
> qemux86, if the i586 one is newer than the core2, it would be installed
> into crownbay's image.

This is a bug in RPM not respecting the arch priorities. Changing PACKAGE_EXTRA_ARCHS is the wrong way to 'fix' that.
Richard Purdie - May 22, 2012, 1:14 p.m.
On Tue, 2012-05-22 at 12:30 +0200, Koen Kooi wrote:
> Op 22 mei 2012, om 12:15 heeft Robert Yang het volgende geschreven:
> 
> > There is a bug if we:
> > 1) bitbake diffutils with MACHINE=crownbay
> > 2) bitbake diffutils with MACHINE=qemux86
> > 3) bitbake core-image-sato with MACHINE=crownbay
> > 
> > Then the diffutils.i586 would be installed to the crownbay's image, this
> > is because diffutils.i586 is newer than diffutils.core2, both of
> > deploy/rpm/i586 and deploy/rpm/core2 are in the dbpath, so rpm will
> > select the newer one (diffutils.i586). This caused by:
> > 
> > PACKAGE_EXTRA_ARCHS_tune-core2 = "${PACKAGE_EXTRA_ARCHS_tune-x86} i386 i486 i586 i686 core2"
> > 
> > The PACKAGE_EXTRA_ARCHS will cause the deploy/rpm/i586 in the crownbay's
> > dbpath, so any pkg which is needed by the image of both crownbay and
> > qemux86, if the i586 one is newer than the core2, it would be installed
> > into crownbay's image.
> 
> This is a bug in RPM not respecting the arch priorities. Changing PACKAGE_EXTRA_ARCHS is the wrong way to 'fix' that.

Agreed, the core2 package should have higher priority compared to the
i586 package and be the one that "wins" and gets installed. This is a
bug in the rpm package/rootfs backend that needs to get fixed.

Cheers,

Richard

Patch

diff --git a/meta/conf/machine/include/tune-core2.inc b/meta/conf/machine/include/tune-core2.inc
index 338ba73..aabdf9c 100644
--- a/meta/conf/machine/include/tune-core2.inc
+++ b/meta/conf/machine/include/tune-core2.inc
@@ -11,7 +11,7 @@  AVAILTUNES += "core2"
 TUNE_FEATURES_tune-core2 = "${TUNE_FEATURES_tune-x86} core2"
 BASE_LIB_tune-core2 = "lib"
 TUNE_PKGARCH_tune-core2 = "core2"
-PACKAGE_EXTRA_ARCHS_tune-core2 = "${PACKAGE_EXTRA_ARCHS_tune-x86} i386 i486 i586 i686 core2"
+PACKAGE_EXTRA_ARCHS_tune-core2 = "${PACKAGE_EXTRA_ARCHS_tune-x86} core2"
 
 AVAILTUNES += "core2-64"
 TUNE_FEATURES_tune-core2-64 = "${TUNE_FEATURES_tune-x86-64} core2"