Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 603826 - sys-apps/portage-2.3.0: AttributeError: '_pkg_str' object has no attribute 'repo' during global updates
Summary: sys-apps/portage-2.3.0: AttributeError: '_pkg_str' object has no attribute 'r...
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:
Blocks: 611328
  Show dependency tree
 
Reported: 2016-12-27 10:53 UTC by Benjamin Schindler
Modified: 2017-05-20 18:09 UTC (History)
0 users

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 Benjamin Schindler 2016-12-27 10:53:16 UTC
Since I synced a little while ago, I'm unable to do anything with emerge. While running global updates, I get this stacktrace: 

metis benjamin # emerge -u okular

Performing Global Updates
(Could take a couple of minutes if you have a lot of binary packages.)
  .='update pass'  *='binary update'  #='/var/db update'  @='/var/db move'
  s='/var/db SLOT move'  %='binary move'  S='binary SLOT move'
  p='update /etc/portage/package.*'
/usr/portage/profiles/updates/3Q-2015..........................
/usr/portage/profiles/updates/4Q-2015.............................................
/usr/portage/profiles/updates/1Q-2016...............................................
/usr/portage/profiles/updates/2Q-2016.................................................................
/usr/portage/profiles/updates/3Q-2016.........................
/usr/portage/profiles/updates/4Q-2016............................................................
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.4/emerge", line 50, in <module>
    retval = emerge_main()
  File "/usr/lib64/python3.4/site-packages/_emerge/main.py", line 1185, in emerge_main
    return run_action(emerge_config)
  File "/usr/lib64/python3.4/site-packages/_emerge/actions.py", line 2771, in run_action
    quiet=("--quiet" in emerge_config.opts)):
  File "/usr/lib64/python3.4/site-packages/portage/_global_updates.py", line 41, in _global_updates
    quiet=quiet, if_mtime_changed=if_mtime_changed)
  File "/usr/lib64/python3.4/site-packages/portage/_global_updates.py", line 169, in _do_global_updates
    moves = bindb.move_ent(update_cmd, repo_match=repo_match)
  File "/usr/lib64/python3.4/site-packages/portage/dbapi/bintree.py", line 410, in move_ent
    and not repo_match(mycpv.repo):
AttributeError: '_pkg_str' object has no attribute 'repo'

I opened bintree.py and inspected the mycpv variable, and got this output: 
kde-base/kdelibs-3.4.3-r1

Now, kdelibs-3.4.3-r1 is arguably _very_ old and I have no clue where it is coming from. This is a box that was installed somewhere when the first 64bit processors from amd came around and was kept uptodate with gentoo ever since (including hardware upgrades) :). 

Emerge --info: 

metis benjamin # emerge --info
Portage 2.3.0 (python 3.4.5-final-0, default/linux/amd64/13.0/desktop/plasma/systemd, gcc-5.4.0, glibc-2.22-r4, 4.4.21-gentoo x86_64)
=================================================================
System uname: Linux-4.4.21-gentoo-x86_64-Intel-R-_Core-TM-_i7_CPU_920_@_2.67GHz-with-gentoo-2.3
KiB Mem:    16432384 total,  11203316 free
KiB Swap:      80320 total,     80320 free
Timestamp of repository gentoo: Mon, 26 Dec 2016 11:00:01 +0000
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
ccache version 3.2.4 [disabled]
app-shells/bash:          4.3_p48-r1::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.22.3_rc4::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo, 3.5.2::gentoo
dev-util/ccache:          3.2.4::gentoo
dev-util/cmake:           3.7.1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.22.4::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.3::gentoo, 5.3.0::gentoo, 5.4.0::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.22-r4::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA ut2003 dlj-1.1 skype-eula googleearth AdobeFlash-10.3 Oracle-BCLA-JavaSE skype-4.0.0.7-copyright AdobeFlash-11.x NVIDIA-CUDA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /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="-O2 -pipe -march=native"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo http://gentoo.mirror.dkm.cz/pub/gentoo/ ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ rsync://mirror.netcologne.de/gentoo/"
LANG="de_CH.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
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"
USE="X a52 aac accessibility acl acpi alsa amd64 avahi bash-completion berkdb branding bzip2 cairo cdda cdparanoia cdr chm cli cmake colord cracklib crypt cscope cups curl cxx daap dbus declarative dri dts dvd dvdr dvdread egl emboss enblend encode evdev exif fam ffmpeg fftw firefox flac fontconfig fortran ftp gdbm geolocation gif gimp git glamor gnome gnome-keyring gold gphoto2 gpm graphite graphviz gstreamer gtk gtk2 gudev hddtemp history hwdb iconv icu imagemagick imap introspection ipv6 jpeg kde kipi kpathsea latex lcms ldap legacy-systray libnotify lldb lm_sensors lto mad mercurial mikmod mmx mmxext mng mod modules mozdevelop moznocompose moznoirc moznomail mozsvg mp3 mp4 mpeg mplayer mtp multilib ncurses nls nogcj nptl nsplugin ogg oggvorbis openal opencl openexr opengl openmp pam pango pch pcre pdf perl phonon plasma png policykit ppds pulseaudio python qml qt3support qt4 qt5 readline resolvconf samba scanner sdl seccomp semantic-desktop session sift spell sql sse sse2 sse3 sse4_1 ssl startup-notification subversion svg systemd tcpd theora threads tiff transcode truetype udev udisks unicode upnp upower usb v4l vim-syntax visualization vorbis wayland webkit widgets wlm wmf wxwidgets x264 xattr xcb xcomposite xinerama xml xmp xpm xscreensaver xv xvid zeroconf zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev" KERNEL="linux" L10N="en de" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en de" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21" USERLAND="GNU" VIDEO_CARDS="nv nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

If you need any more info, let me know
Comment 1 Benjamin Schindler 2016-12-27 12:18:18 UTC
Of course, when I post a bugreport, I also find its cause minutes later. It turned out, that I had really old packages lying around in /usr/portage/packages. eclean packages did the trick. 

But it would be nice if portage could handle such a situation a bit more gracefully than throwing its hands in the air :)
Comment 4 Zac Medico gentoo-dev 2017-05-20 18:09:42 UTC
Fixed in portage-2.3.5.