Bug 1457 - multilib: wrong rpm package dependency when installing a mixed multilib image.
Summary: multilib: wrong rpm package dependency when installing a mixed multilib image.
Status: RESOLVED FIXED
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: High major
Target Milestone: 1.1
Assignee: Mark Hatle
QA Contact:
URL:
Whiteboard:
Depends on: 1499
Blocks: 1448
  Show dependency tree
 
Reported: 2011-09-05 23:58 UTC by Dongxiao Xu
Modified: 2011-09-26 08:06 UTC (History)
7 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dongxiao Xu 2011-09-05 23:58:58 UTC
Environment setup:
1. In local.conf, setting following variables:

##############################################
BB_NUMBER_THREADS = "8"
PARALLEL_MAKE = "-j 8"
MACHINE ??= "qemux86-64"
DISTRO ?= "poky"
PACKAGE_CLASSES ?= "package_rpm package_ipk"
EXTRA_IMAGE_FEATURES = "debug-tweaks"
USER_CLASSES ?= "image-mklibs"
CONF_VERSION = "1"

MULTILIB_IMAGE_INSTALL = "lib32-connman-gnome"
require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
##############################################

2. Run command: "bitbake core-image-sato"

Behavior:

In the final image, we saw lib32-connman-gnome and all its dependencies are installed into the final image, however those relavant 64 bit normal packages are not installed.

The correct behavior should be: 
System installs core-image-sato with all its 64 bit packages.
Besides, lib32-connman-gnome and all the dependent 32bit packages are installed.
Comment 1 Dongxiao Xu 2011-09-06 00:19:21 UTC
Actually there are two issues inside:

1. Within current code, we don't have rpm backend side code to install MULTILIB_PACKAGE_INSTALL listed packages.

2. System installs wrong 32bit rpm packages for qemux86-64 core-image-sato while all arch repos are included in solvedb.macro. See following

_solve_dbpath
/distro/dongxiao/build-ml/tmp/deploy/rpm/qemux86_64/solvedb:
/distro/dongxiao/build-ml/tmp/deploy/rpm/x86_64/solvedb:
/distro/dongxiao/build-ml/tmp/deploy/rpm/all/solvedb:
/distro/dongxiao/build-ml/tmp/deploy/rpm/qemux86_64/solvedb:
/distro/dongxiao/build-ml/tmp/deploy/rpm/x86/solvedb:
/distro/dongxiao/build-ml/tmp/deploy/rpm/all/solvedb

As we know, connman-gnome is included by task-core-x11-sato. When installing task-core-x11-sato-1.0-r31.qemux86_64.rpm, it wrongly choose "tmp/deploy/rpm/x86/connman-gnome-0.5-r7.x86.rpm" instead of "tmp/deploy/rpm/x86_64/connman-gnome-0.5-r7.x86_64.rpm".

Root cause of this bug should be, we don't have architecture dependency information in rpm spec file.

I saw there are several discussion with rpm.org, requesting for this kind of feature, see https://bugzilla.redhat.com/show_bug.cgi?id=235755 and https://lists.dulug.duke.edu/pipermail/rpm-devel/2007-April/002260.html

Does rpm5 has such kind of feature currently?
Or do you have other recommends on solving this issue?
Comment 2 Dongxiao Xu 2011-09-06 01:49:29 UTC
Maybe we can define certain format Provides in required recipe's spec file like the following:

zlib.spec
Provides: zlib.x86-64

abc.spec
Requires: zlib.x86-64
Comment 3 Mark Hatle 2011-09-20 08:35:19 UTC
from the email list exchange, this defect is really the result of two issues:

1) The wrong libraries are being selected during a multilib install  (See bug 1499)

2) The desire to specify multilib tasks, and have the task items installed based on the multilib instead of system wide resolution

#2 may not make it for the 1.1 release, as this is contrary to the internal design of RPM.  We will likely need to find an alternative way to do this.  One such suggestion is to break up the install process into two steps, a core step and a multilib step.  Dongxiao Xu was able to prototype this, but due to #1, was unable to get any reasonable results showing this is a possible solution or not.
Comment 4 Dongxiao Xu 2011-09-20 08:54:25 UTC
Yes we can split the installation into two steps.

But I am still a bit confuse that, in the second step when we tried to calculate the install solution manifest, why there are still a lot of normal packages (x86_64 and qemux86_64) along with our desired multilib packages (x86 packages)?
Comment 5 Mark Hatle 2011-09-20 09:00:51 UTC
The cause the mixed and matched set was most likely bug 1499.  The requirements within the packages were not set properly so RPM ended up searching the whole set of packages for something that could address the dependency.

It may have also been from the configuration used when processing the first/second set of dependencies.  Specifically there are three resolver configurations currently being constructed within RPM.

1) core-set
2) multilib-set
3) "all" (combination of 1 & 2)

Normally during resolution we use the 'all' set.  If we end up breaking up the solution generation, we'll want to also change which dependency set -- or at least the ordering of the sets to give precedence to the set we want more likely to be installed over the other.

Is the prototype you created for splitting up the install anywhere?  If so I can look at it once I get through the 1499 defect and work on using the right set of files for the resolution.

(The sets are located in tmp/work/deploy/rpm/*.conf)
Comment 6 Dongxiao Xu 2011-09-20 09:06:00 UTC
Yes, it is under this branch:
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=dxu4/ml-testing

I also replied an Email "Re: multilib status" when testing your commits. You can have a look in your inbox.
Comment 7 Richard Purdie 2011-09-26 08:06:22 UTC
I believe these issues were addressed with http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=64ea342b4f7fa448f4f65e26c7976f88d02330b1