| Summary: | [internalsolv] opkg: tries to install all providers of a virtual package | ||
|---|---|---|---|
| Product: | [Yocto Project Subprojects] opkg | Reporter: | Markus Lehtonen <markus.lehtonen> |
| Component: | opkg | Assignee: | Alejandro del Castillo <alejandro.delcastillo> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Undecided | CC: | markus.lehtonen |
| Version: | 0.3.3 | ||
| Target Milestone: | 0.3.5 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
|
Description
Markus Lehtonen
2016-12-09 10:52:50 UTC
Could you provide more details on a reproducing case? With the following configuration: o = opk.OpkGroup() o.add(Package="a", Provides="b") o.add(Package="x", Provides="b") o.add(Package="y", Provides="b") o.add(Package="z", Depends="b") o.write_opk() o.write_list( adelcast@delcastillo2 ~/git/opkg/tests $ opkg -o /tmp/opkg install z Installing a (1.0) on root Downloading file:/tmp/opk/a_1.0_all.opk. Installing z (1.0) on root cleaning the workspace, then trying to install the provided package directly: adelcast@delcastillo2 ~/git/opkg/tests $ opkg -o /tmp/opkg install b Installing a (1.0) on root Downloading file:/tmp/opk/a_1.0_all.opk. Which looks correct to me. This worked with both solvers. I tested this a bit more and it seems to be a bit more complex case. I see the problem when I try to build core-image-minimal in this branch: http://git.openembedded.org/openembedded-core-contrib/log/?h=marquiz/fixes-10433 Virtual package that causes problems is initd-functions. Installing one package at a time (e.g. sysvinit that requires initd-functions) seems to work as expected, pulling only one provider of initd-functions. However, problems arise when I try to install packagegroup-core-boot. Running opkg-native manually: $ tmp-glibc/sysroots/x86_64-linux/usr/bin/opkg --volatile-cache -f tmp-glibc/work/qemux86-oe-linux/core-image-minimal/1.0-r0/opkg.conf -o /var/tmp/opkg-testroot -V4 install packagegroup-core-boot I see the following in the log: ------ 8< 8< 8< -------------------------------------------- pkg_hash_fetch_unsatisfied_dependencies: Checking dependencies for 'initscripts'. pkg_hash_fetch_best_installation_candidate: Best installation candidate for initd-functions: pkg_hash_fetch_best_installation_candidate: apkg=initd-functions nprovides=2. pkg_hash_fetch_best_installation_candidate: Adding initscripts-functions to providers. pkg_hash_fetch_best_installation_candidate: Adding lsbinitscripts to providers. pkg_hash_fetch_best_installation_candidate: Not selecting initscripts-functions 1.0 due to unmatched constraint. pkg_hash_fetch_best_installation_candidate: Not selecting lsbinitscripts 9.68 due to unmatched constraint. pkg_hash_fetch_unsatisfied_dependencies: satisfying_pkg=(nil) pkg_hash_fetch_best_installation_candidate: Best installation candidate for initd-functions: pkg_hash_fetch_best_installation_candidate: apkg=initd-functions nprovides=2. pkg_hash_fetch_best_installation_candidate: Adding initscripts-functions to providers. pkg_hash_fetch_best_installation_candidate: Adding lsbinitscripts to providers. pkg_hash_fetch_best_installation_candidate: initscripts-functions arch=i586 arch_priority=21 version=1.0. pkg_hash_fetch_best_installation_candidate: lsbinitscripts arch=i586 arch_priority=21 version=9.68. pkg_hash_fetch_best_installation_candidate: 2 matching pkgs for apkg=initd-functions: pkg_hash_fetch_best_installation_candidate: initscripts-functions 1.0 i586 pkg_hash_fetch_best_installation_candidate: lsbinitscripts 9.68 i586 pkg_hash_fetch_best_installation_candidate: Using latest matching lsbinitscripts 9.68 i586. ------ 8< 8< 8< -------------------------------------------- BUT, strangely later in the log: ------ 8< 8< 8< -------------------------------------------- pkg_hash_fetch_unsatisfied_dependencies: Already checked dependencies for 'initscripts'. pkg_hash_fetch_best_installation_candidate: Best installation candidate for initd-functions: pkg_hash_fetch_best_installation_candidate: apkg=initd-functions nprovides=2. pkg_hash_fetch_best_installation_candidate: Adding initscripts-functions to providers. pkg_hash_fetch_best_installation_candidate: Adding lsbinitscripts to providers. pkg_hash_fetch_best_installation_candidate: initscripts-functions arch=i586 arch_priority=21 version=1.0. pkg_hash_fetch_best_installation_candidate: lsbinitscripts arch=i586 arch_priority=21 version=9.68. pkg_hash_fetch_best_installation_candidate: Match initscripts-functions with priority 21. pkg_hash_fetch_best_installation_candidate: 2 matching pkgs for apkg=initd-functions: pkg_hash_fetch_best_installation_candidate: initscripts-functions 1.0 i586 pkg_hash_fetch_best_installation_candidate: lsbinitscripts 9.68 i586 pkg_hash_fetch_best_installation_candidate: Using priorized matching initscripts-functions 1.0 i586. ------ 8< 8< 8< -------------------------------------------- Somehow opkg first chooses lsbinitscripts and later prioritizes initscripts-functions. And, tries to install both as the install fails with: Collected errors: * check_conflicts_for: The following packages conflict with initscripts-functions: * check_conflicts_for: lsbinitscripts * * check_conflicts_for: The following packages conflict with initscripts-functions: * check_conflicts_for: lsbinitscripts * Did something change on the branch posted? I cloned the branch and was able to build the image successfully. I also tried to manually install packagegroup-core-boot and that also worked. Ah, I forgot one detail. Naturally, you need to have both/all of the providers in the ipk repository in order to see the problem. This command should reproduce the problem: $ bitbake initscripts lsbinitscripts core-image-minimal I was able to reproduce the problem with:
import os
import opk, cfg, opkgcl
opk.regress_init()
o = opk.OpkGroup()
o.add(Package="a", Depends="b")
o.add(Package="b", Depends="d")
o.add(Package="c", Provides="d", Conflicts="e")
o.add(Package="e", Provides="d", Conflicts="c")
o.write_opk()
o.write_list()
opkgcl.update()
opkgcl.install("a")
That configuration does show the "check_conflicts_for" error, but the packages are all installed correctly (and opkg returns 0). I believe that's enough to trip OE.
The good news is that this is an internal solver only error, the libsolv backend works with no problems (and is more robust in many other ways).
Fixed on 500346f628a6a04a7e4ca8075f92f63d45a94603 |