Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 47064 - emerge suddenly breaking on a box without xfree -- AttributeError
Summary: emerge suddenly breaking on a box without xfree -- AttributeError
Status: RESOLVED DUPLICATE of bug 47105
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High major (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-07 04:21 UTC by Terje Kvernes
Modified: 2005-07-17 13:06 UTC (History)
5 users (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 Terje Kvernes 2004-04-07 04:21:18 UTC
after I did "emerge sync" this morning, emerge was left in the following state.

[orion-seven ~] # emerge
Traceback (most recent call last):
  File "/usr/bin/emerge", line 14, in ?
    import portage
  File "/usr/lib/portage/pym/portage.py", line 6129, in ?
    settings.regenerate() # XXX: Regenerate use after we get a vartree -- GLOBAL
  File "/usr/lib/portage/pym/portage.py", line 1392, in regenerate
    self.configdict["auto"]["USE"]=autouse(db[root]["vartree"],use_cache=use_cache)
  File "/usr/lib/portage/pym/portage.py", line 1121, in autouse
    myresult=dep_check(mydep,myvartree.dbapi,None,use="no",use_cache=use_cache)
  File "/usr/lib/portage/pym/portage.py", line 3310, in dep_check
    mylist=flatten(dep_listcleanup(dep_zapdeps(mysplit,mysplit2)))
  File "/usr/lib/portage/pym/portage.py", line 3053, in dep_zapdeps
    myresult=dep_zapdeps(unreduced[x],reduced[x])
  File "/usr/lib/portage/pym/portage.py", line 3039, in dep_zapdeps
    elif myportapi.match(x):
AttributeError: 'NoneType' object 

needless to say, this hurt.  so, I did:

"strace -f -eopen,stat64 emerge" and found that emerge dies just after trying to look at /var/db/pkg/x11-base.  I also added a small debug output to the failing block in /usr/lib/portage/pym/portage.py, and well, after trying to talk to x11-base/xfree (which isn't installed), emerge dies.

as a quick fix, I decided to give portage what it was looking for:

[orion-seven ~] # mkdir -p  /var/db/pkg/x11-base/xfree-4.3.0-r5

and lo and behold:

[orion-seven ~] # emerge 
emerge: please tell me what to do.


Usage:
   emerge [ options ] [ action ] [ ebuildfile | tbz2file | dependency ] [ ... ]
   emerge [ options ] [ action ] < system | world >
   emerge < sync | info >
   emerge --resume [ --pretend | --ask | --skipfirst ]
   emerge help [ system | config | sync ] 
Options: -[abcCdDefhikKlnoOpPsSuUvV] [--oneshot] [--noconfmem]
                                    [--columns] [--nospinner]
Actions: [ clean | depclean | inject | prune | regen | search | unmerge ]


   For more help try 'emerge --help' or consult the man page.

now, the scary bit is that if I uninstall xfree again, emerge will break again.  apart from wondering exactly what happened, I'm looking for a permanent cure.  as for the current state of the system, here is "emerge info".  (I've also tested this with portage 2.0.50-r1 with the same results.)

[orion-seven ~] # emerge info
Portage 2.0.50-r3 (default-x86-1.4, gcc-3.3.3, glibc-2.3.3_pre20040207-r0, 2.4.24)
=================================================================
System uname: 2.4.24 i686 Pentium III (Coppermine)
Gentoo Base System version 1.4.3.13p1
distcc 2.13 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -mcpu=i686 -funroll-loops -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -mcpu=i686 -funroll-loops -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs buildpkg ccache distcc sandbox"
GENTOO_MIRRORS="http://212.219.247.11/sites/www.ibiblio.org/gentoo/ http://212.219.247.19/sites/www.ibiblio.org/gentoo/"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.forsaken.lands"
USE="apache2 apm arts avi berkdb cdr crypt cups curl dvdr encode foomaticdb gd gdbm gif gpm gtk2 imlib jpeg libg++ libwww mad maildir mbox mikmod motif mpeg mysql ncurses nls oggvorbis opengl oss pam pdflib perl png python quicktime readline sdl slang spell ssl svga tcpd threads truetype x86 xml2 xmms xv zlib"
Comment 1 Spider (RETIRED) gentoo-dev 2004-04-07 04:53:15 UTC
yep..  confirming this breakage on another box:
Traceback (most recent call last):
  File "/usr/bin/emerge", line 2250, in ?
    reload(portage)
  File "/usr/lib/portage/pym/portage.py", line 6128, in ?
    settings.regenerate() # XXX: Regenerate use after we get a vartree -- GLOBAL
  File "/usr/lib/portage/pym/portage.py", line 1392, in regenerate
    self.configdict["auto"]["USE"]=autouse(db[root]["vartree"],use_cache=use_cache)
  File "/usr/lib/portage/pym/portage.py", line 1121, in autouse
    myresult=dep_check(mydep,myvartree.dbapi,None,use="no",use_cache=use_cache)
  File "/usr/lib/portage/pym/portage.py", line 3309, in dep_check
    mylist=flatten(dep_listcleanup(dep_zapdeps(mysplit,mysplit2)))
  File "/usr/lib/portage/pym/portage.py", line 3052, in dep_zapdeps
    myresult=dep_zapdeps(unreduced[x],reduced[x])
  File "/usr/lib/portage/pym/portage.py", line 3038, in dep_zapdeps
    elif myportapi.match(x):
AttributeError: 'NoneType' object has no attribute 'match'


also, it will fail to do "emerge sync"  as well due to this..  nasty :-/
Comment 2 Bjarke Istrup Pedersen (RETIRED) gentoo-dev 2004-04-07 06:05:17 UTC
This is wierd, please change status to blocker since it breaks the system.
Comment 3 Ronald Moesbergen 2004-04-07 08:22:45 UTC
Me Too. Can't run emerge anymore...
Comment 5 Matthew Walker 2004-04-07 09:05:12 UTC
Ditto. Don't have strace so I can't find what package is fubarring it for me.

xenon files # emerge sync
Traceback (most recent call last):
  File "/usr/bin/emerge", line 14, in ?
    import portage
  File "/usr/lib/portage/pym/portage.py", line 6128, in ?
    settings.regenerate() # XXX: Regenerate use after we get a vartree -- GLOBAL
  File "/usr/lib/portage/pym/portage.py", line 1392, in regenerate
    self.configdict["auto"]["USE"]=autouse(db[root]["vartree"],use_cache=use_cache)
  File "/usr/lib/portage/pym/portage.py", line 1121, in autouse
    myresult=dep_check(mydep,myvartree.dbapi,None,use="no",use_cache=use_cache)
  File "/usr/lib/portage/pym/portage.py", line 3309, in dep_check
    mylist=flatten(dep_listcleanup(dep_zapdeps(mysplit,mysplit2)))
  File "/usr/lib/portage/pym/portage.py", line 3052, in dep_zapdeps
    myresult=dep_zapdeps(unreduced[x],reduced[x])
  File "/usr/lib/portage/pym/portage.py", line 3038, in dep_zapdeps
    elif myportapi.match(x):
AttributeError: 'NoneType' object has no attribute 'match'
Comment 6 Nicholas Jones (RETIRED) gentoo-dev 2004-04-07 09:57:13 UTC
It's an profile/package/rsync related issue.
'emerge sync' and it should be fixed by now.

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