Summary: | >=sys-apps/portage-3.0.54-r1 crashes with error AttributeError: 'Blocker' object has no attribute 'cpv' | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Sebastian Pipping <sping> |
Component: | Core | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | captaincrutches, chiitoo, eschwartz, matoro_gentoo, sam |
Priority: | Normal | Keywords: | InVCS, PullRequest |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://github.com/gentoo/portage/pull/1169 https://bugs.gentoo.org/show_bug.cgi?id=916614 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 916256 | ||
Bug Blocks: |
Description
Sebastian Pipping
![]() This is happening for me also without --pretend. $ portageq envvar EMERGE_DEFAULT_OPTS --usepkg --autounmask=n --backtrack=300 --complete-graph --with-bdeps=y --keep-going $ sudo -E emerge -avuDN1 --keep-going @world These are the packages that would be merged, in order: Calculating dependencies... done! Dependency resolution took 38.75 s (backtrack: 0/300). [ebuild NS ] media-libs/webrtc-audio-processing-1.3:1::gentoo [0.3.1-r1:0::gentoo] USE="(-static-libs%)" ABI_X86="(64) -32 (-x32)" 860 KiB [ebuild U ] dev-python/alembic-1.12.1::gentoo [1.12.0::gentoo] USE="-doc -test" PYTHON_TARGETS="python3_11 -pypy3 -python3_10 -python3_12" 1,173 KiB [ebuild U ] dev-lang/zig-0.11.0-r1:0.11::gentoo [0.11.0:0.11::gentoo] USE="-doc" 0 KiB [ebuild U ] media-libs/libpulse-16.99.1::gentoo [16.1-r4::gentoo] USE="X asyncns dbus glib -doc -gtk (-selinux) -systemd -test -valgrind" ABI_X86="(64) -32 (-x32)" 1,529 KiB [ebuild U ] media-sound/pulseaudio-daemon-16.99.1::gentoo [16.1-r8::gentoo] USE="X alsa alsa-plugin asyncns bluetooth dbus elogind gdbm glib orc ssl udev webrtc-aec -aptx -equalizer -fftw -gstreamer -jack -ldac -lirc -ofono-headset (-oss) (-selinux) -sox (-system-wide) -systemd -tcpd -test -valgrind -zeroconf" 0 KiB [blocks b ] <media-sound/pulseaudio-daemon-16.99.1 ("<media-sound/pulseaudio-daemon-16.99.1" is soft blocking media-libs/libpulse-16.99.1) Total: 5 packages (4 upgrades, 1 in new slot), Size of downloads: 3,560 KiB Conflict: 1 block (all satisfied) WARNING: One or more updates/rebuilds have been skipped due to a dependency conflict: dev-python/setuptools-scm:0 (dev-python/setuptools-scm-8.0.4:0/0::gentoo, ebuild scheduled for merge) USE="-test" ABI_X86="(64)" PYTHON_TARGETS="python3_11 -pypy3 -python3_10 -python3_12" conflicts with <dev-python/setuptools-scm-8[python_targets_python3_11(-)] required by (dev-python/setuptools_scm_git_archive-1.4-r1-4:0/0::gentoo, installed) USE="-test" ABI_X86="(64)" PYTHON_TARGETS="python3_11 -pypy3 -python3_10" ^ ^ Traceback (most recent call last): File "/usr/lib/python-exec/python3.11/emerge", line 57, in main retval = emerge_main() ^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/_emerge/main.py", line 1306, in emerge_main return run_action(emerge_config) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/_emerge/actions.py", line 4020, in run_action retval = action_build(emerge_config, spinner=spinner) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/_emerge/actions.py", line 475, in action_build mydepgraph.display_problems() File "/usr/lib/python3.11/site-packages/_emerge/depgraph.py", line 10593, in display_problems self._show_ignored_binaries() File "/usr/lib/python3.11/site-packages/_emerge/depgraph.py", line 1229, in _show_ignored_binaries self._show_ignored_binaries_respect_use(ignored_binaries["respect_use"]) File "/usr/lib/python3.11/site-packages/_emerge/depgraph.py", line 1237, in _show_ignored_binaries_respect_use merging = {pkg.cpv for pkg in self._dynamic_config._displayed_list} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/_emerge/depgraph.py", line 1237, in <setcomp> merging = {pkg.cpv for pkg in self._dynamic_config._displayed_list} ^^^^^^^ AttributeError: 'Blocker' object has no attribute 'cpv' Issue not present with =sys-apps/portage-3.0.53. This is my code crashing that I added in https://github.com/gentoo/portage/pull/1148 It is supposed to filter the list (whenever it is displayed, including both with and without pretend) that follows: ``` The following binary packages have been ignored due to non matching USE: ``` I guess when I wrote it I didn't see any blocker packages ;) and I assumed that everything in that list was a Package? I seem to recall the docs suggested this too. My bad. It should be easy to filter out with a small addition to the setcomp, though. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=a6853d5493b7bed37e60c2e3b7536b209500ba3f commit a6853d5493b7bed37e60c2e3b7536b209500ba3f Author: Sam James <sam@gentoo.org> AuthorDate: 2023-11-02 13:59:05 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-11-06 15:57:56 +0000 emerge: account for EROOT in _show_ignored_binaries_respect_use Zac suggested this when reviewing the fix for bug #916336. Bug: https://bugs.gentoo.org/916336 Signed-off-by: Sam James <sam@gentoo.org> lib/_emerge/depgraph.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) https://gitweb.gentoo.org/proj/portage.git/commit/?id=262b8c9213c6698be4a7e2ce88536568899e6c2a commit 262b8c9213c6698be4a7e2ce88536568899e6c2a Author: Sam James <sam@gentoo.org> AuthorDate: 2023-10-30 05:30:04 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-11-06 15:57:56 +0000 emerge: fix binpkg-respect-use notice with blockers Items in _dynamic_config._displayed_list might be blockers, so filter those out. Bug: https://bugs.gentoo.org/916336 Fixes: bb82666b48e18f448661a1a8bf6a39b773cc4b1c Signed-off-by: Sam James <sam@gentoo.org> NEWS | 2 + lib/_emerge/depgraph.py | 6 +- lib/portage/tests/resolver/test_useflags.py | 87 +++++++++++++++++++++++++++++ 3 files changed, 94 insertions(+), 1 deletion(-) The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0baf5e0bd0879f55a87111ced2140262dbec689b commit 0baf5e0bd0879f55a87111ced2140262dbec689b Author: Sam James <sam@gentoo.org> AuthorDate: 2023-11-06 21:41:33 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-11-06 21:41:33 +0000 sys-apps/portage: add 3.0.55 Closes: https://bugs.gentoo.org/916256 Closes: https://bugs.gentoo.org/915842 Closes: https://bugs.gentoo.org/916247 Closes: https://bugs.gentoo.org/916336 Closes: https://bugs.gentoo.org/916601 Closes: https://bugs.gentoo.org/916614 Signed-off-by: Sam James <sam@gentoo.org> sys-apps/portage/Manifest | 1 + sys-apps/portage/portage-3.0.55.ebuild | 238 +++++++++++++++++++++++++++++++++ 2 files changed, 239 insertions(+) |