Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 374423 - emerge fails with AttributeError traceback after dependency calculation
Summary: emerge fails with AttributeError traceback after dependency calculation
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
: 376167 (view as bug list)
Depends on:
Blocks: 373933
  Show dependency tree
 
Reported: 2011-07-08 10:08 UTC by unixway.drive+bugs.gentoo
Modified: 2011-07-25 01:35 UTC (History)
1 user (show)

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


Attachments
output of `emerge --pretend --debug --backtrack=0 kopete` (debug.log,45.68 KB, text/plain)
2011-07-08 11:25 UTC, unixway.drive+bugs.gentoo
Details
output of `emerge --pretend --debug --backtrack=0 --autounmask=n kopete` (debug.log,4.26 KB, text/plain)
2011-07-08 19:11 UTC, unixway.drive+bugs.gentoo
Details
fix the AttributeError (attributeerror.patch,1.84 KB, patch)
2011-07-10 03:15 UTC, Zac Medico
Details | Diff
fix another AttributeError case (attributeerror2.patch,1.52 KB, patch)
2011-07-10 10:47 UTC, Zac Medico
Details | Diff
fix a third AttributeError case (attributeerror3.patch,1.31 KB, patch)
2011-07-10 12:08 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description unixway.drive+bugs.gentoo 2011-07-08 10:08:11 UTC
Depending on package, emerge call results in a traceback:

thriller@xn--rih ~ >>> sudo emerge -av kopete

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

Calculating dependencies... done!
Traceback (most recent call last):
  File "/usr/bin/emerge", line 43, in <module>
    retval = emerge_main()
  File "/usr/lib64/portage/pym/_emerge/main.py", line 1907, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/lib64/portage/pym/_emerge/actions.py", line 302, in action_build
    mydepgraph.display_problems()
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 5998, in display_problems
    self._display_problems()
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 6019, in _display_problems
    self._show_slot_collision_notice()
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 702, in _show_slot_collision_notice
    self._dynamic_config._slot_conflict_handler = slot_conflict_handler(self)
  File "/usr/lib64/portage/pym/_emerge/resolver/slot_collision.py", line 129, in __init__
    self._prepare_conflict_msg_and_check_for_specificity()
  File "/usr/lib64/portage/pym/_emerge/resolver/slot_collision.py", line 346, in _prepare_conflict_msg_and_check_for_specificity
    if use in violated_atom.use.enabled.union(violated_atom.use.disabled):
AttributeError: 'NoneType' object has no attribute 'enabled'



here is some emerge info:



thriller@xn--rih ~ >>> sudo emerge --info             
Portage 2.1.10.3 (default/linux/amd64/10.0/no-multilib, gcc-4.6.0, glibc-2.13-r2, 2.6.38.5-zen-gentoo-thriller x86_64)
=================================================================
System uname: Linux-2.6.38.5-zen-gentoo-thriller-x86_64-Intel-R-_Core-TM-_i3_CPU_M_370_@_2.40GHz-with-gentoo-2.0.2
Timestamp of tree: Fri, 08 Jul 2011 09:30:01 +0000
app-shells/bash:          4.1_p9
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.1-r1, 3.1.3-r1
dev-util/cmake:           2.8.4-r1
dev-util/pkgconfig:       0.25-r2
sys-apps/baselayout:      2.0.2
sys-apps/openrc:          0.8.3-r1
sys-apps/sandbox:         2.4
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:       2.20.1-r1
sys-devel/gcc:            4.6.0
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.2.10
sys-devel/make:           3.82
sys-kernel/linux-headers: 2.6.36.1 (virtual/os-headers)
sys-libs/glibc:           2.13-r2
Repositories: gentoo sunrise gentoo-haskell rion x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -mfpmath=sse -O2 -fopenmp -fomit-frame-pointer -pipe -flto"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -mfpmath=sse -O2 -fopenmp -fomit-frame-pointer -pipe -flto"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/sunrise /var/lib/layman/haskell /var/lib/layman/rion /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 aspell bzip2 cjk cli cracklib crypt cxx dri fam fortran iconv icu idn ipv6 lcms libnotify mmx modules mudflap nptl nptlonly openmp pcre pppd readline session spell sse sse2 sse3 ssl ssse3 startup-notification sysfs tcpd threads truetype unicode vaapi vim-syntax xinerama xorg zlib" 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" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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="braindump flow karbon kexi kpresenter krita tables words" 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 ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="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" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

thriller@xn--rih ~ >>> sudo eselect python list
Available Python interpreters:
  [1]   python2.7 *
  [2]   python3.1
Comment 1 Zac Medico gentoo-dev 2011-07-08 10:19:07 UTC
Please attach output for the same command with the --debug option:

  emerge --pretend --debug kopete &> debug.log
Comment 2 Zac Medico gentoo-dev 2011-07-08 10:32:59 UTC
(In reply to comment #1)
> Please attach output for the same command with the --debug option:
> 
>   emerge --pretend --debug kopete &> debug.log

Also use --backtrack=0 to make the log smaller.
Comment 3 unixway.drive+bugs.gentoo 2011-07-08 11:25:45 UTC
Created attachment 279431 [details]
output of `emerge --pretend --debug --backtrack=0 kopete`
Comment 4 Zac Medico gentoo-dev 2011-07-08 14:49:05 UTC
(In reply to comment #3)
> Created attachment 279431 [details]
> output of `emerge --pretend --debug --backtrack=0 kopete`

Please repeat this with --autounmask=n added to the options and attache the log.

It looks like the conflict that leads to this might be due to x11-libs/qt-gui-4.7.2 having USE=qt3support disabled while kde-base/kopete-4.6.3 requires that qt3support be enabled.
Comment 5 unixway.drive+bugs.gentoo 2011-07-08 19:11:18 UTC
Created attachment 279469 [details]
output of `emerge --pretend --debug --backtrack=0 --autounmask=n kopete`

well, now it ends up without a traceback
Comment 6 Zac Medico gentoo-dev 2011-07-10 03:15:07 UTC
Created attachment 279563 [details, diff]
fix the AttributeError

Save as /tmp/attributeerror.patch and apply as follows:

 patch /usr/lib/portage/pym/_emerge/resolver/slot_collision.py /tmp/attributeerror.patch

This probably fixes your issue. Please test.
Comment 7 unixway.drive+bugs.gentoo 2011-07-10 04:21:23 UTC
well, it still fails:

thriller@xn--rih ~ >>> sudo emerge -av kopete
Password:

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

Calculating dependencies... done!
Traceback (most recent call last):
  File "/usr/bin/emerge", line 43, in <module>
    retval = emerge_main()
  File "/usr/lib64/portage/pym/_emerge/main.py", line 1907, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/lib64/portage/pym/_emerge/actions.py", line 302, in action_build
    mydepgraph.display_problems()
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 5998, in display_problems
    self._display_problems()
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 6019, in _display_problems
    self._show_slot_collision_notice()
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 702, in _show_slot_collision_notice
    self._dynamic_config._slot_conflict_handler = slot_conflict_handler(self)
  File "/usr/lib64/portage/pym/_emerge/resolver/slot_collision.py", line 129, in __init__
    self._prepare_conflict_msg_and_check_for_specificity()
  File "/usr/lib64/portage/pym/_emerge/resolver/slot_collision.py", line 352, in _prepare_conflict_msg_and_check_for_specificity
    if use in violated_atom.use.enabled or \
AttributeError: 'NoneType' object has no attribute 'enabled'
Comment 8 unixway.drive+bugs.gentoo 2011-07-10 04:29:10 UTC
Ah! The primitive debugging tool called print(repr(violated_atom)) reports

u'~x11-libs/qt-core-4.7.2'

with or without a patch.
Comment 9 Zac Medico gentoo-dev 2011-07-10 10:47:48 UTC
Created attachment 279587 [details, diff]
fix another AttributeError case

(In reply to comment #8)
> Ah! The primitive debugging tool called print(repr(violated_atom)) reports
> 
> u'~x11-libs/qt-core-4.7.2'

Thanks, that helped a lot. This patch applies on top of the first one. It will definitely solve the problem, since it explicitly checks the attribute that triggered the AttributeError.
Comment 10 unixway.drive+bugs.gentoo 2011-07-10 10:58:02 UTC
Calculating dependencies... done!
Traceback (most recent call last):
  File "/usr/bin/emerge", line 43, in <module>
    retval = emerge_main()
  File "/usr/lib64/portage/pym/_emerge/main.py", line 1907, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/lib64/portage/pym/_emerge/actions.py", line 302, in action_build
    mydepgraph.display_problems()
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 5998, in display_problems
    self._display_problems()
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 6019, in _display_problems
    self._show_slot_collision_notice()
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 702, in _show_slot_collision_notice
    self._dynamic_config._slot_conflict_handler = slot_conflict_handler(self)
  File "/usr/lib64/portage/pym/_emerge/resolver/slot_collision.py", line 154, in __init__
    new_solutions = self._check_configuration(config, all_conflict_atoms_by_slotatom, conflict_nodes)
  File "/usr/lib64/portage/pym/_emerge/resolver/slot_collision.py", line 604, in _check_configuration
    for flag in violated_atom.use.required:
AttributeError: 'NoneType' object has no attribute 'required'
Comment 11 Zac Medico gentoo-dev 2011-07-10 12:08:12 UTC
Created attachment 279595 [details, diff]
fix a third AttributeError case

This applies on top of the other 2 patches. Hopefully this is the last one.
Comment 12 unixway.drive+bugs.gentoo 2011-07-10 16:01:24 UTC
Everything works now, thanks!
Comment 13 Zac Medico gentoo-dev 2011-07-13 01:40:40 UTC
Thanks for testing. This is fixed in 2.1.10.5 and 2.2.0_alpha44.
Comment 14 Zac Medico gentoo-dev 2011-07-25 01:35:27 UTC
*** Bug 376167 has been marked as a duplicate of this bug. ***