Summary: | virtual/dist-kernel: dependency conflict when using --deep parameter | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | poncho <poncho> |
Component: | Current packages | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gentoo, ionen, mgorny, sam |
Priority: | Normal | Keywords: | InVCS |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://bugs.gentoo.org/show_bug.cgi?id=717140 https://github.com/gentoo/portage/pull/656 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 764923 | ||
Attachments: | emerge --info + emerge --debug -pvuUD @world log |
Description
poncho
2021-01-10 09:00:31 UTC
Created attachment 682267 [details]
emerge --info + emerge --debug -pvuUD @world log
I've run into the same while having two 3rd party modules, works fine if I have only one, `emerge -1 gentoo-kernel` (or dist-kernel) on its own, or do as aforementioned and remove --deep
May not be the best test case given my own modules are in a local overlay (xpadneo and bumped nvidia-drivers) among a few other things, but
attaching debug log in case of any use.
@dev-portage, any clue? I have updated my kernel manually, so I can't test it anymore. However, if someone is still in the blocked state, could you try if removing PDEPEND from the newest version of gentoo-kernel changes anything? (In reply to Michał Górny from comment #3) > I have updated my kernel manually, so I can't test it anymore. However, if > someone is still in the blocked state, could you try if removing PDEPEND > from the newest version of gentoo-kernel changes anything? Commenting out the PDEPEND section in gentoo-kernel-5.4.88: [ebuild NS ] sys-kernel/gentoo-kernel-5.4.88 [5.4.87] USE="initramfs -debug -savedconfig -test" I.e. an upgrade of gentoo-kernel (without the modules being rebuilt) > Commenting out the PDEPEND section in gentoo-kernel-5.4.88:
>
> [ebuild NS ] sys-kernel/gentoo-kernel-5.4.88 [5.4.87] USE="initramfs
> -debug -savedconfig -test"
>
> I.e. an upgrade of gentoo-kernel (without the modules being rebuilt)
This was with -qvuDN --complete-graph --with-bdeps=y
Yeah, I reverted to a broken state in an overlayfs and all removing PDEPEND does is that nothing is pulling dist-kernel anymore so modules don't rebuild. I tried to entertain replacing gentoo-kernel by dist-kernel in my world file but it just brings back the earlier error. (In reply to Ionen Wolkens from comment #6) > Yeah, I reverted to a broken state in an overlayfs and all removing PDEPEND > does is that nothing is pulling dist-kernel anymore so modules don't rebuild. This is weird because a --deep update of your installed kernel modules should pull in virtual/dist-kernel update. (In reply to Ionen Wolkens from comment #1) > Created attachment 682267 [details] > emerge --info + emerge --debug -pvuUD @world log > > I've run into the same while having two 3rd party modules, works fine if I > have only one, `emerge -1 gentoo-kernel` (or dist-kernel) on its own, or do > as aforementioned and remove --deep > > May not be the best test case given my own modules are in a local overlay > (xpadneo and bumped nvidia-drivers) among a few other things, but > attaching debug log in case of any use. It looks like there's probably an issue in the slot_operator_update_probe method (probably related to its internal check_reverse_dependencies function which is very fragile) that causes is to miss the slot operator rebuild here: slot_operator_update_probe: existing child package: (virtual/dist-kernel-5.10.5:0/5.10.5::gentoo, installed) existing parent package: (x11-drivers/nvidia-drivers-460.32.03:0/460::local, installed) new child package: None new parent package: None After that the logic related to related to bug 743115 causes it to mask the update here: backtracking due to slot conflict: first package: (virtual/dist-kernel-5.10.5:0/5.10.5::gentoo, installed) package(s) to mask: [<Package ('ebuild', '/', 'virtual/dist-kernel-5.10.4', 'merge', 'gentoo')>, <Package ('ebuild', '/', 'virtual/dist-kernel-5.4.88', 'merge', 'gentoo')>, <Package ('ebuild', '/', 'virtual/dist-kernel-5.4.87', 'merge', 'gentoo')>, <Package ('ebuild', '/', 'virtual/dist-kernel-5.4.86', 'merge', 'gentoo')>, <Package ('ebuild', '/', 'virtual/dist-kernel-5.10.6', 'merge', 'gentoo')>] slot: virtual/dist-kernel:0 parents: ((games-util/xpadneo-9999:0/0::local, installed), '=virtual/dist-kernel-5.10.5'), ((sys-kernel/gentoo-kernel-5.10.5:5.10.5/5.10.5::gentoo, installed), '>=virtual/dist-kernel-5.10.5'), ((x11-drivers/nvidia-drivers-460.32.03:0/460::local, installed), 'virtual/dist-kernel:='), ((sys-kernel/gentoo-kernel-5.10.6:5.10.6/5.10.6::gentoo, ebuild scheduled for merge), '>=virtual/dist-kernel-5.10.6'), ((games-util/xpadneo-9999:0/0::local, installed), 'virtual/dist-kernel:0/5.10.5='), ((x11-drivers/nvidia-drivers-460.32.03:0/460::local, installed), '=virtual/dist-kernel-5.10.5'), ((sys-kernel/gentoo-kernel-5.10.6:5.10.6/5.10.6::gentoo, ebuild scheduled for merge), '=virtual/dist-kernel-5.10.6'), ((games-util/xpadneo-9999:0/0::local, installed), 'virtual/dist-kernel:='), ((x11-drivers/nvidia-drivers-460.32.03:0/460::local, installed), 'virtual/dist-kernel:0/5.10.5=') I'll try to create a unit test case to reproduce the undesirable slot_operator_update_probe behavior. I think that check_reverse_dependencies rejects the update specifically because of the =virtual/dist-kernel-5.10.5 atom that's generated by this virtual expansion: Virtual Parent: (virtual/dist-kernel-5.10.5:0/5.10.5::gentoo, installed) Virtual Depstring: || ( ~sys-kernel/gentoo-kernel-5.10.5 ~sys-kernel/gentoo-kernel-bin-5.10.5 ~sys-kernel/vanilla-kernel-5.10.5 ) Candidates: ['=virtual/dist-kernel-5.10.6', 'virtual/dist-kernel:=', '=virtual/linux-sources-3-r5', 'virtual/linux-sources', '=virtual/libelf-3', 'virtual/libelf', '=virtual/dist-kernel-5.10.5', 'virtual/dist-kernel:0/5.10.5='] We haven't seen this problem before because it's only triggered when slot operator deps are used with virtuals. Is there any good workaround you'd suggest? (In reply to Michał Górny from comment #10) > Is there any good workaround you'd suggest? I don't have a workaround aside from --ignore-built-slot-operator-deps=y, but I have a patch that's similar to the fix for bug 717140 that I'll attach in a moment. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=9b6417f527aa98742a51d7859051342b6fb1383f commit 9b6417f527aa98742a51d7859051342b6fb1383f Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2021-01-11 01:57:44 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2021-01-11 03:04:28 +0000 Add unit test demonstrating bug 764764 Bug: https://bugs.gentoo.org/764764 Signed-off-by: Zac Medico <zmedico@gentoo.org> .../resolver/test_slot_operator_reverse_deps.py | 98 +++++++++++++++++++++- 1 file changed, 97 insertions(+), 1 deletion(-) Patch posted for review: https://archives.gentoo.org/gentoo-portage-dev/message/9560f752949a473ae746b133b7c8f21b https://github.com/gentoo/portage/pull/656 The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=4c25c0d7af7ad71fccbfafe1e5019116c691968e commit 4c25c0d7af7ad71fccbfafe1e5019116c691968e Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2021-01-11 00:19:06 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2021-01-11 03:32:45 +0000 check_reverse_dependencies: dereference virtual expansions (bug 764764) If an atom is the result of virtual expansion, then derefrence it to _orig_atom in check_reverse_dependencies so that it will be correctly handled as a built slot operator dependency when appropriate. This solves a case triggered in bug 764764 where a virtual expansion from virtual/dist-kernel:0/5.10.5= to =virtual/dist-kernel-5.10.5 prevented the atom from being handled as a built slot operator dependency, which prevented rebuilds from being triggered. Bug: https://bugs.gentoo.org/764764 Signed-off-by: Zac Medico <zmedico@gentoo.org> lib/_emerge/depgraph.py | 22 ++++++++++++++++++++++ .../resolver/test_slot_operator_reverse_deps.py | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d9df956e086c0766ee352320ecc346c27d23df3 commit 2d9df956e086c0766ee352320ecc346c27d23df3 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2021-01-11 09:45:19 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2021-01-11 09:47:00 +0000 sys-apps/portage: Bump to version 3.0.13 #763339 always allow event loops to run in threads #764764 fix virtual/dist-kernel slot operator rebuilds #764905 wrap asyncio child watcher for thread safety Bug: https://bugs.gentoo.org/764923 Bug: https://bugs.gentoo.org/763339 Bug: https://bugs.gentoo.org/764764 Bug: https://bugs.gentoo.org/764905 Package-Manager: Portage-3.0.13, Repoman-3.0.2 Signed-off-by: Zac Medico <zmedico@gentoo.org> sys-apps/portage/Manifest | 1 + sys-apps/portage/portage-3.0.13.ebuild | 268 +++++++++++++++++++++++++++++++++ 2 files changed, 269 insertions(+) With portage-3.0.13, I seem to correctly get $ sudo emerge -avuDN @kobboi-all --with-bdeps=y --complete-graph These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild NS ] sys-kernel/gentoo-kernel-5.4.88:5.4.88::gentoo [5.4.87:5.4.87::gentoo] USE="initramfs -debug -savedconfig -test" 0 KiB [ebuild r U ] virtual/dist-kernel-5.4.88:0/5.4.88::gentoo [5.4.87:0/5.4.87::gentoo] 0 KiB [ebuild rR ] app-emulation/virtualbox-modules-6.1.16-r1:0/6.1::gentoo USE="dist-kernel -pax_kernel" 0 KiB [ebuild rR ] net-misc/openvswitch-2.14.0::gentoo USE="dist-kernel ssl -debug -modules -monitor" PYTHON_TARGETS="python3_7 python3_8 (-python3_6) -python3_9" 0 KiB [ebuild rR ] x11-drivers/nvidia-drivers-390.138-r5:0/390::gentoo USE="X dist-kernel driver gtk3 kms (libglvnd) multilib tools uvm wayland -compat -static-libs" ABI_X86="32 (64) (-x32)" 0 KiB CPU_FLAGS_X86="sse2 sse3 sse4_1 sse4_2 ssse3 -aes -avx -avx2 -avx512f -f16c" PYTHON_SINGLE_TARGET="python3_8 (-python3_6) -python3_7 -python3_9" 28,531 KiB (...) The following packages are causing rebuilds: (virtual/dist-kernel-5.4.88:0/5.4.88::gentoo, ebuild scheduled for merge) causes rebuilds for: (x11-drivers/nvidia-drivers-390.138-r5:0/390::gentoo, ebuild scheduled for merge) (net-misc/openvswitch-2.14.0:0/0::gentoo, ebuild scheduled for merge) (app-emulation/virtualbox-modules-6.1.16-r1:0/6.1::gentoo, ebuild scheduled for merge) Opened bug 765895 for early stabilization. I still got this error when enabling binary packages, #emerge --deep --newuse --newrepo --update --keep-going --getbinpkg @world Local copy of remote index is up-to-date and will be used. Calculating dependencies... done! Dependency resolution took 759.29 s (backtrack: 20/20). [binary U ] x11-misc/xkeyboard-config-2.40-r1-1 [2.40] [ebuild U ] dev-util/cmake-3.27.9 [3.27.7] [ebuild U ] media-libs/gmmlib-22.3.14 [22.3.12] [binary U ] x11-base/xwayland-23.2.3-2 [23.2.2] [binary U ] kde-plasma/kwin-5.27.10-r2-1 [5.27.10-r1] !!! Multiple package instances within a single package slot have been pulled !!! into the dependency graph, resulting in a slot conflict: virtual/dist-kernel:0 (virtual/dist-kernel-6.6.9:0/6.6.9::gentoo, installed) USE="" ABI_X86="(64)" pulled in by virtual/dist-kernel:0/6.6.9= required by (sys-fs/zfs-2.2.2-r1:0/5::gentoo, installed) USE="dist-kernel nls pam rootfs -custom-cflags -debug -kernel-builtin -minimal -python (-selinux) (-split-usr) -test-suite -verify-sig" ABI_X86="(64)" PYTHON_TARGETS="python3_11 -python3_10" ^^^^^^^^^ =virtual/dist-kernel-6.6.9 required by (sys-fs/zfs-kmod-2.2.2:0/2.2.2::gentoo, installed) USE="dist-kernel dist-kernel-cap rootfs strip -custom-cflags -debug -modules-compress -modules-sign -verify-sig" ABI_X86="(64)" ^ ^^^^^ (and 4 more with the same problems) (virtual/dist-kernel-6.6.10:0/6.6.10::gentoo, ebuild scheduled for merge) USE="" ABI_X86="(64)" pulled in by >=virtual/dist-kernel-6.6.10 required by (sys-kernel/gentoo-kernel-bin-6.6.10:6.6.10/6.6.10::gentoo, ebuild scheduled for merge) USE="initramfs -generic-uki -modules-compress -secureboot -test" ABI_X86="(64)" ^^ ^^^^^^ =virtual/dist-kernel-6.6.10 required by (sys-kernel/gentoo-kernel-bin-6.6.10:6.6.10/6.6.10::gentoo, ebuild scheduled for merge) USE="initramfs -generic-uki -modules-compress -secureboot -test" ABI_X86="(64)" ^ ^^^^^^ NOTE: Use the '--verbose-conflicts' option to display parents omitted above It may be possible to solve this problem by using package.mask to prevent one of those packages from being selected. However, it is also possible that conflicting dependencies exist such that they are impossible to satisfy simultaneously. If such a conflict exists in the dependencies of two different packages, then those packages can not be installed simultaneously. You may want to try a larger value of the --backtrack option, such as --backtrack=30, in order to see if that will solve this conflict automatically. For more information, see MASKED PACKAGES section in the emerge man page or refer to the Gentoo Handbook. Dropping the "--deep" parameter and it works as expected. (In reply to Chang Liu from comment #18) > I still got this error when enabling binary packages, > > #emerge --deep --newuse --newrepo --update --keep-going --getbinpkg @world > > Local copy of remote index is up-to-date and will be used. > Calculating dependencies... done! > Dependency resolution took 759.29 s (backtrack: 20/20). Try more backtracking (it hit the limit). |