Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 508252 - emerge @security fails with "AttributeError: 'str' object has no attribute 'version'"
Summary: emerge @security fails with "AttributeError: 'str' object has no attribute 'v...
Status: RESOLVED DUPLICATE of bug 488820
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-20 17:47 UTC by Jauhien Piatlicki (RETIRED)
Modified: 2014-04-26 17:43 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 Jauhien Piatlicki (RETIRED) gentoo-dev 2014-04-20 17:47:37 UTC
emerge @security fails when it finds stuff to update for =sys-apps/portage-2.2.10.

Log is here (I've added additional print(c) statement after line 388 of /usr/lib/portage/pym/portage/glsa.py to see what package causes the problem):

jauhien@kamputar 03 % sudo emerge -va @security                      

These are the packages that would be merged, in order:

Calculating dependencies |dev-libs/libyaml-0.1.6
dev-libs/libyaml-0.1.5                                                                                                                                               ... done!
Traceback (most recent call last):
  File "/usr/bin/emerge", line 50, in <module>
    retval = emerge_main()
  File "/usr/lib/portage/pym/_emerge/main.py", line 1037, in emerge_main
    return run_action(emerge_config)
  File "/usr/lib/portage/pym/_emerge/actions.py", line 4061, in run_action
    emerge_config.args, spinner)
  File "/usr/lib/portage/pym/_emerge/actions.py", line 320, in action_build
    settings, trees, myopts, myparams, myaction, myfiles, spinner)
  File "/usr/lib/portage/pym/_emerge/depgraph.py", line 8403, in backtrack_depgraph
    myaction, myfiles, spinner)
  File "/usr/lib/portage/pym/_emerge/depgraph.py", line 8435, in _backtrack_depgraph
    success, favorites = mydepgraph.select_files(myfiles)
  File "/usr/lib/portage/pym/_emerge/depgraph.py", line 3093, in select_files
    return self._select_files(args)
  File "/usr/lib/portage/pym/_emerge/depgraph.py", line 3220, in _select_files
    set_atoms = root_config.setconfig.getSetAtoms(s)
  File "/usr/lib/portage/pym/portage/_sets/__init__.py", line 275, in getSetAtoms
    myatoms = myset.getAtoms()
  File "/usr/lib/portage/pym/portage/_sets/base.py", line 65, in getAtoms
    self._load()
  File "/usr/lib/portage/pym/portage/_sets/base.py", line 60, in _load
    self.load()
  File "/usr/lib/portage/pym/portage/_sets/security.py", line 39, in load
    if self.useGlsa(myglsa):
  File "/usr/lib/portage/pym/portage/_sets/security.py", line 82, in useGlsa
    return myglsa.isVulnerable()
  File "/usr/lib/portage/pym/portage/glsa.py", line 664, in isVulnerable
    self.portdbapi, self.vardbapi))
  File "/usr/lib/portage/pym/portage/glsa.py", line 393, in getMinUpgrade
    or (minimize ^ (vercmp(c.version, update.version) > 0))) \
AttributeError: 'str' object has no attribute 'version'


I've managed to reproduce this error on another machine. Steps to reproduce:

1. Install dev-libs/libyaml-0.1.4
2. Run `emerge @security`

I have not tested if this error affects other portage versions.
Comment 1 Alex Xu (Hello71) 2014-04-21 23:23:36 UTC
Please paste the output of emerge --info =sys-apps/portage-2.2.10.
Comment 2 Jauhien Piatlicki (RETIRED) gentoo-dev 2014-04-22 10:03:07 UTC
jauhien@localhost ~ % emerge --info '=sys-apps/portage-2.2.10'
Portage 2.2.10 (default/linux/amd64/13.0, gcc-4.8.2, glibc-2.19, 3.10.0-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.10.0-gentoo-x86_64-Intel-R-_Core-TM-_i5-3330_CPU_@_3.00GHz-with-gentoo-2.2
KiB Mem:     8071976 total,   2759252 free
KiB Swap:   16777148 total,  16776996 free
Timestamp of tree: Sat, 19 Apr 2014 17:30:01 +0000
ld GNU ld (GNU Binutils) 2.24
app-shells/bash:          4.2_p47
dev-java/java-config:     2.2.0::java
dev-lang/python:          2.6.9, 2.7.6, 3.2.5-r3, 3.3.5, 3.4.0
dev-util/cmake:           2.8.12.2
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.14.1
sys-devel/binutils:       2.24-r2
sys-devel/gcc:            4.7.3-r1, 4.8.2-r1
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.14 (virtual/os-headers)
sys-libs/glibc:           2.19
Repositories: gentoo sunrise jauhien marmalade gnu-elpa gentoo-haskell pypi java science ctan melpa mv emacs mrueg rust xtreemfs fix test
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -mtune=native -fomit-frame-pointer -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.1/conf"
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 -march=native -mtune=native -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync metadata-transfer news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j1"
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"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/sunrise /var/lib/layman/jauhien /var/lib/layman/marmalade /var/lib/layman/gnu-elpa /var/lib/layman/haskell /var/lib/layman/pypi /var/lib/layman/java /var/lib/layman/science /var/lib/layman/ctan /var/lib/layman/melpa /var/lib/layman/mv /var/lib/layman/emacs /var/lib/layman/mrueg /var/lib/layman/rust /var/lib/layman/xtreemfs /usr/local/portage/fix /usr/local/portage/test"
USE="X aac acl acpi alsa amd64 bash-completion berkdb bzip2 c++0x cairo cli consolekit cracklib crypt cups curl cxx dbus djvu dri emacs encode expat ffmpeg fftw flac fortran gdbm gif gtk gtk3 hepmc iconv icu ipv6 javascript jpeg jpeg2k libnotify lm_sensors mad mbox mmx mmxext modplug modules mp3 mp4 multilib ncurses networkmanager nls nptl nsplugin ogg opengl openmp pam pcre pdf perl png policykit pythia8 python qt3support readline session smp sndfile sqlite sqlite3 sse sse2 ssl startup-notification system-sqlite tcpd threads tiff truetype udev unicode v4l vorbis xml xmlrpc zlib zsh-completion" 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" 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" INPUT_DEVICES="synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="be be_BY en en_GB ru uk pl" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_6 python2_7 python3_2 python3_3" RSYNC_PATCHES="checksum-reading checksum-updating" RUBY_TARGETS="ruby19 ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="i915 intel" 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"
USE_PYTHON="2.6 2.7 3.2 3.3"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC

=================================================================
                        Package Settings
=================================================================

sys-apps/portage-2.2.10 was built with the following:
USE="doc epydoc (ipc) python3 -build (-pypy) -python2 (-selinux) -xattr" ABI_X86="64" LINGUAS="ru" PYTHON_TARGETS="python2_6 python2_7 python3_2 python3_3 (-pypy) (-pypy2_0) -python3_4"


This is from one of machines, from the other one I'll paste later if you'll need.
Comment 3 Sebastian Luther (few) 2014-04-26 17:43:53 UTC

*** This bug has been marked as a duplicate of bug 488820 ***