Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 917315 - sys-apps/portage-3.0.55 failed with AttributeError: '_failed_pkg' object has no attribute 'cpv'
Summary: sys-apps/portage-3.0.55 failed with AttributeError: '_failed_pkg' object has ...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on: 916977
Blocks:
  Show dependency tree
 
Reported: 2023-11-13 22:08 UTC by David Zaslavsky
Modified: 2023-12-01 03:03 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Zaslavsky 2023-11-13 22:08:59 UTC
I'm running a world update in which two packages fail to build, and right after Portage resumes, it fails with an error as follows:

=======================================================
# emerge -uUD @world
>>> Verifying ebuild manifests
>>> Emerging (1 of 147) net-im/skypeforlinux-8.105.0.208::gentoo
>>> Emerging (2 of 147) kde-frameworks/kinit-5.112.0::gentoo
>>> Failed to emerge net-im/skypeforlinux-8.105.0.208, Log file:
>>>  '/var/tmp/portage/portage/net-im/skypeforlinux-8.105.0.208/temp/build.log'
>>> Installing (2 of 147) kde-frameworks/kinit-5.112.0::gentoo
>>> Completed (2 of 147) kde-frameworks/kinit-5.112.0::gentoo
>>> Failed to install kde-frameworks/kinit-5.112.0, Log file:
>>>  '/var/tmp/portage/portage/kde-frameworks/kinit-5.112.0/temp/build.log'
*** Resuming merge...
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 4023, in run_action
    retval = action_build(emerge_config, spinner=spinner)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/_emerge/actions.py", line 678, in action_build
    retval = mergetask.merge()
             ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/_emerge/Scheduler.py", line 1264, in merge
    failed_pkg_map[(pkg.cpv, pkg.root)] = pkg
                    ^^^^^^^
AttributeError: '_failed_pkg' object has no attribute 'cpv'
=======================================================

I have these extra options set:
  EMERGE_DEFAULT_OPTS="--quiet --ask-enter-invalid --keep-going --verbose-conflicts --jobs 2 --load-average 15"
The failures of those specific packages don't seem to be related: net-im/skypeforlinux-8.105.0.208 fails because of https://bugs.gentoo.org/917314, and kde-frameworks/kinit-5.112.0 fails because I don't have xattrs enabled on my root filesystem (easy enough to fix).

It may be useful to note that a world update excluding either of the failing packages will not produce the error:

=======================================================
# emerge -uUD @world --exclude net-im/skypeforlinux
>>> Verifying ebuild manifests
>>> Emerging (1 of 146) kde-frameworks/kinit-5.112.0::gentoo
>>> Installing (1 of 146) kde-frameworks/kinit-5.112.0::gentoo
>>> Completed (1 of 146) kde-frameworks/kinit-5.112.0::gentoo
>>> Failed to install kde-frameworks/kinit-5.112.0, Log file:
>>>  '/var/tmp/portage/portage/kde-frameworks/kinit-5.112.0/temp/build.log'
*** Resuming merge...
[...kinit failure log omitted...]
 * The following package has failed to build, install, or execute postinst:
 * 
 *  (kde-frameworks/kinit-5.112.0:5/5.112::gentoo, ebuild scheduled for merge), Log file:
 *   '/var/tmp/portage/portage/kde-frameworks/kinit-5.112.0/temp/build.log'
 * 
# emerge -uUD @world --exclude kde-frameworks/kinit

!!! All ebuilds that could satisfy "=kde-frameworks/kinit-5.112*:5" have been masked.
!!! One of the following masked packages is required to complete your request:
- kde-frameworks/kinit-5.112.0::gentoo (masked by: exclude option)

(dependency required by "kde-frameworks/kded-5.112.0::gentoo" [ebuild])
(dependency required by "kde-frameworks/kio-5.112.0::gentoo" [installed])
(dependency required by "sys-block/partitionmanager-23.08.3::gentoo" [ebuild])
(dependency required by "@selected" [set])
(dependency required by "@world" [argument])
For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.
=======================================================

Running `emerge --resume` (without --skipfirst) right after the initial failure also did not reproduce the error; it did basically the same thing as excluding net-im/skypeforlinux.

Reproducible: Always

Steps to Reproduce:
1. Run emerge such that it fails to install the two packages as mentioned in the description
(sorry this is vague, I'm really not sure what configuration of packages could be installed on a different system to allow reproducing this, but I'll add an update if I find out)
Actual Results:  
emerge crashes with the AttributeError shown in the description

Expected Results:  
emerge should continue installing packages, or should cleanly fail if no more packages can be installed because of unmet dependencies

$ emerge --info
Portage 3.0.55 (python 3.11.6-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-12.2.0, glibc-2.38-r7, 6.6.0-gentoo x86_64)
=================================================================
System uname: Linux-6.6.0-gentoo-x86_64-AMD_Ryzen_7_2700X_Eight-Core_Processor-with-glibc2.38
KiB Mem:    65816492 total,    511964 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Mon, 13 Nov 2023 00:46:59 +0000
Head commit of repository gentoo: 7027beee599386703acd48684b8a441e3c96aacb

Head commit of repository ellipsix: 2dff5273d55bcbc86440dd1ec1d3f7e948e48bd5

Timestamp of repository guru: Sun, 12 Nov 2023 01:01:53 +0000
Head commit of repository guru: df3872361ec5899b85ed08b83d3aedadafa16ff0

Timestamp of repository holgersson-overlay: Fri, 10 Nov 2023 10:49:58 +0000
Head commit of repository holgersson-overlay: e18dfe3a8c043723a0c842d9225eb9819f971194

Timestamp of repository steam-overlay: Tue, 07 Nov 2023 05:37:13 +0000
Head commit of repository steam-overlay: ff5e56891b292cb2f9c62b257f986919bd4cfb4d

sh bash 5.2_p21
ld GNU ld (Gentoo 2.41 p2) 2.41.0
ccache version 4.8.3 [disabled]
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p21::gentoo
dev-java/java-config:      2.3.1-r1::gentoo
dev-lang/perl:             5.38.0-r1::gentoo
dev-lang/python:           3.10.13::gentoo, 3.11.6::gentoo, 3.12.0_p1::gentoo
dev-lang/rust:             1.73.0::gentoo
dev-util/ccache:           4.8.3::gentoo
dev-util/cmake:            3.27.7::gentoo
dev-util/meson:            1.2.3::gentoo
sys-apps/baselayout:       2.14-r1::gentoo
sys-apps/openrc:           0.51::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/autoconf:        2.13-r8::gentoo, 2.71-r7::gentoo
sys-devel/automake:        1.16.5-r1::gentoo
sys-devel/binutils:        2.41-r2::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           16.0.6::gentoo, 17.0.4::gentoo
sys-devel/gcc:             12.2.0::gentoo, 13.2.1_p20231014::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             17.0.4::gentoo
sys-devel/llvm:            16.0.6::gentoo, 17.0.4::gentoo
sys-devel/make:            4.4.1-r1::gentoo
sys-kernel/linux-headers:  6.6::gentoo (virtual/os-headers)
sys-libs/glibc:            2.38-r7::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000
    volatile: False

acetylene09_local
    location: /usr/local/portage
    masters: gentoo
    volatile: True

ellipsix
    location: /var/db/repos/ellipsix
    sync-type: git
    sync-uri: https://github.com/ellipsix/gentoo-overlay.git
    masters: gentoo
    volatile: False

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/guru.git
    masters: gentoo
    volatile: False

holgersson-overlay
    location: /var/db/repos/holgersson-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/holgersson-overlay.git
    masters: gentoo
    volatile: False

steam-overlay
    location: /var/db/repos/steam-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
    masters: gentoo
    volatile: False

crossdev
    location: /var/db/repos/localrepo-crossdev
    masters: gentoo
    priority: 10
    volatile: False

Installed sets: @local-active
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet --ask-enter-invalid --keep-going --verbose-conflicts --jobs 2 --load-average 15"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.gossamerhost.com http://gentoo-mirror.flux.utah.edu/ http://gentoo.osuosl.org/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j20 -l15"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp/portage"
SHELL="/bin/bash"
USE="X a52 aac aacs acl acpi activities alsa amd64 bash-completion bdplus bluray branding bzip2 cairo caps cdda cdr cjk cli crypt cups dbus declarative dri dts dvd dvdr editorconfig elogind encode exif flac fortran gdbm gif git gpm gui iconv icu ipv6 jpeg kde kerberos kwallet lcms libnotify libtirpc lm_sensors mad mng mp3 mp4 mpeg multilib ncurses networkmanager nls nptl ogg opengl openmp opus pam pango pcre pdf pipewire plasma png policykit ppds pulseaudio qalculate qml qt5 readline screencast sdl seccomp semantic-desktop smp sound spell split-usr ssl startup-notification svg test-rust threads tiff truetype udev udisks unicode upower usb vlc vorbis vulkan wayland widgets wxwidgets x264 xattr xcb xft xml xv xvid yubikey zlib" ABI_X86="64" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev roccat_konextd" KERNEL="linux" L10N="en-US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_11 python3_10" RUBY_TARGETS="ruby31" VIDEO_CARDS="amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Larry the Git Cow gentoo-dev 2023-11-14 04:24:29 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=bf61ab8c1ae0eb3311fea20f1bdc5cf7d69fd586

commit bf61ab8c1ae0eb3311fea20f1bdc5cf7d69fd586
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2023-11-13 23:17:26 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2023-11-13 23:17:30 +0000

    _emerge: Fix _failed_pkg cpv AttributeError
    
    Bug: https://bugs.gentoo.org/917315
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 lib/_emerge/Scheduler.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-11-14 06:16:07 UTC
thank you zac
Comment 3 Larry the Git Cow gentoo-dev 2023-12-01 03:03:28 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=baec60737ddc370dcf77ce1c797ff187357c4b14

commit baec60737ddc370dcf77ce1c797ff187357c4b14
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-12-01 02:54:12 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-12-01 02:54:29 +0000

    sys-apps/portage: add 3.0.56
    
    Closes: https://bugs.gentoo.org/760893
    Closes: https://bugs.gentoo.org/917033
    Closes: https://bugs.gentoo.org/917259
    Closes: https://bugs.gentoo.org/917315
    Closes: https://bugs.gentoo.org/918515
    Closes: https://bugs.gentoo.org/918682
    Closes: https://bugs.gentoo.org/918683
    Closes: https://bugs.gentoo.org/916977
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-3.0.56.ebuild | 238 +++++++++++++++++++++++++++++++++
 2 files changed, 239 insertions(+)