Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 38168 - portage-2.0.50_pre16: regenworld is broken
Summary: portage-2.0.50_pre16: regenworld is broken
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: Inclusion
Depends on:
Blocks:
 
Reported: 2004-01-14 06:46 UTC by Andreas Simon
Modified: 2004-02-09 09:31 UTC (History)
0 users

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


Attachments
new regenworld script (regenworld,2.22 KB, text/plain)
2004-01-14 17:40 UTC, Marius Mauch (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Simon 2004-01-14 06:46:15 UTC
regenworld fails with a KeyError.

When running regenworld /var/cache/edb/world doesn't get created or updated.

# regenworld
candidate: >=sys-apps/baselayout-1.7.9-r1
candidate: >=sys-apps/portage-2.0.25
candidate: >=sys-devel/binutils-2.13.90.0.4
candidate: >=sys-devel/gcc-3.2
candidate: >=sys-libs/glibc-2.2.5
candidate: virtual/modutils
candidate: dev-lang/python
candidate: app-shells/sash
candidate: dev-lang/perl
candidate: virtual/editor
candidate: net-misc/dhcpcd
candidate: net-misc/iputils
candidate: net-misc/rsync
candidate: net-misc/wget
candidate: app-shells/bash
candidate: app-arch/bzip2
candidate: sys-apps/kbd
candidate: app-arch/cpio
candidate: sys-apps/coreutils
candidate: sys-apps/debianutils
candidate: sys-apps/diffutils
candidate: sys-fs/e2fsprogs
candidate: sys-apps/ed
candidate: sys-apps/fbset
candidate: sys-apps/file
candidate: sys-apps/findutils
candidate: sys-apps/slocate
candidate: sys-apps/gawk
candidate: sys-apps/grep
candidate: sys-apps/groff
candidate: app-arch/gzip
candidate: sys-apps/hdparm
candidate: sys-apps/less
candidate: sys-apps/man
candidate: sys-apps/man-pages
candidate: sys-apps/net-tools
candidate: sys-apps/procps
candidate: sys-apps/psmisc
candidate: sys-apps/sed
candidate: sys-apps/setserial
candidate: <sys-apps/shadow-5
candidate: sys-apps/pam-login
candidate: app-arch/sharutils
candidate: app-arch/tar
candidate: >=sys-apps/texinfo-4.2-r1
candidate: sys-apps/util-linux
candidate: sys-apps/which
candidate: sys-devel/autoconf
candidate: >=sys-devel/automake-1.6.1-r5
candidate: sys-devel/bc
candidate: sys-devel/bin86
candidate: sys-devel/bison
candidate: sys-devel/flex
candidate: >=sys-devel/libtool-1.4.1-r4
candidate: sys-devel/m4
candidate: sys-devel/make
candidate: sys-devel/patch
candidate: sys-libs/cracklib
candidate: sys-libs/db
candidate: >=sys-libs/ncurses-5.2.20020112a
candidate: >=sys-libs/pam-0.75-r9
candidate: sys-libs/pwdb
candidate: sys-libs/readline
candidate: sys-libs/zlib
candidate: virtual/ssh
candidate: sys-fs/devfsd
Traceback (most recent call last):
  File "/usr/sbin/regenworld", line 58, in ?
    mylist=portage.db["/"]["vartree"].dbapi.match(mykey)
  File "/usr/lib/portage/pym/portage.py", line 3865, in match
    mymatch=match_from_list(mydep,self.cp_list(mykey))
  File "/usr/lib/portage/pym/portage.py", line 3258, in match_from_list
    raise KeyError, "Specific key requires an operator (%s)" % (mydep)
KeyError: 'Specific key requires an operator (app-editors/xemacs-21.4.12)'



The content of the world file doesn't seem to matter. If I remove the old world file the error message is similar:

# rm -f /var/cache/edb/world; regenworld
candidate: >=sys-apps/baselayout-1.7.9-r1
candidate: >=sys-apps/portage-2.0.25
candidate: >=sys-devel/binutils-2.13.90.0.4
candidate: >=sys-devel/gcc-3.2
candidate: >=sys-libs/glibc-2.2.5
candidate: virtual/modutils
candidate: dev-lang/python
candidate: app-shells/sash
candidate: dev-lang/perl
candidate: virtual/editor
candidate: net-misc/dhcpcd
candidate: net-misc/iputils
candidate: net-misc/rsync
candidate: net-misc/wget
candidate: app-shells/bash
candidate: app-arch/bzip2
candidate: sys-apps/kbd
candidate: app-arch/cpio
candidate: sys-apps/coreutils
candidate: sys-apps/debianutils
candidate: sys-apps/diffutils
candidate: sys-fs/e2fsprogs
candidate: sys-apps/ed
candidate: sys-apps/fbset
candidate: sys-apps/file
candidate: sys-apps/findutils
candidate: sys-apps/slocate
candidate: sys-apps/gawk
candidate: sys-apps/grep
candidate: sys-apps/groff
candidate: app-arch/gzip
candidate: sys-apps/hdparm
candidate: sys-apps/less
candidate: sys-apps/man
candidate: sys-apps/man-pages
candidate: sys-apps/net-tools
candidate: sys-apps/procps
candidate: sys-apps/psmisc
candidate: sys-apps/sed
candidate: sys-apps/setserial
candidate: <sys-apps/shadow-5
candidate: sys-apps/pam-login
candidate: app-arch/sharutils
candidate: app-arch/tar
candidate: >=sys-apps/texinfo-4.2-r1
candidate: sys-apps/util-linux
candidate: sys-apps/which
candidate: sys-devel/autoconf
candidate: >=sys-devel/automake-1.6.1-r5
candidate: sys-devel/bc
candidate: sys-devel/bin86
candidate: sys-devel/bison
candidate: sys-devel/flex
candidate: >=sys-devel/libtool-1.4.1-r4
candidate: sys-devel/m4
candidate: sys-devel/make
candidate: sys-devel/patch
candidate: sys-libs/cracklib
candidate: sys-libs/db
candidate: >=sys-libs/ncurses-5.2.20020112a
candidate: >=sys-libs/pam-0.75-r9
candidate: sys-libs/pwdb
candidate: sys-libs/readline
candidate: sys-libs/zlib
candidate: virtual/ssh
candidate: sys-fs/devfsd
add to world: sys-apps/acl
add to world: media-libs/alsa-lib
add to world: media-libs/alsa-oss
add to world: media-sound/alsa-utils
add to world: dev-java/ant
add to world: sys-apps/apmd
Traceback (most recent call last):
  File "/usr/sbin/regenworld", line 58, in ?
    mylist=portage.db["/"]["vartree"].dbapi.match(mykey)
  File "/usr/lib/portage/pym/portage.py", line 3865, in match
    mymatch=match_from_list(mydep,self.cp_list(mykey))
  File "/usr/lib/portage/pym/portage.py", line 3258, in match_from_list
    raise KeyError, "Specific key requires an operator (%s)" % (mydep)
KeyError: 'Specific key requires an operator (app-editors/xemacs-21.4.12)'


I don't have app-editors/xemacs installed.


# emerge info
Portage 2.0.50_pre16 (default-x86-1.4, gcc-3.3.2, glibc-2.3.3_pre20031222-r0, 2.6.1-rc2-love1)
=================================================================
System uname: 2.6.1-rc2-love1 i686 AMD Athlon(tm) XP 1800+
Gentoo Base System version 1.4.3.12
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59
Automake: sys-devel/automake-1.7.8
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -O2 -pipe -fstack-protector"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/kde/cvs/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=athlon-xp -O2 -pipe -fstack-protector"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache fixpackages sandbox"
GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/opt/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="3dnow X acl alsa apm arts artswrappersuid avi berkdb cdr crypt cups dvb dvd encode esd faad flac foomaticdb gdbm gif gnome gpm gstreamer gtk gtk2 imap imlib ipv6 java jpeg kde lcms libg++ libwww mad maildir mikmod mmx motif mozilla mpeg mule ncurses nls nptl offensive oggvorbis opengl oss pam pdflib perl pic png python qt quicktime readline sasl sdl slang spell sse ssl tcltk tcpd tetex threads tiff truetype x86 xml2 xmms xv zlib"
Comment 1 Marius Mauch (RETIRED) gentoo-dev 2004-01-14 17:40:48 UTC
Created attachment 23834 [details]
new regenworld script

partly rewritten regenworld script. Please test and report success/failure.
Comment 2 Andreas Simon 2004-01-15 02:10:11 UTC
The new script fixes the KeyError,
I can no longer reproduce it with the new script.

But one thing:
If I delete the old world file it creates a new one but only adds 164 of 496 installed packages to it. Shouldn't that be more?
Comment 3 Marius Mauch (RETIRED) gentoo-dev 2004-01-15 07:02:28 UTC
the world file should only contain packages that you emerged (not the dependencies) and are not in the system profile, so 1/3 or all packages sounds reasonable.
Comment 4 Guy 2004-01-18 17:10:11 UTC
I no longer get keyword errors.

Thank you.

However, I haven't a clue of how to deal with ambiguous package names.

i.e.

ace is an ambiguous package name, candidates are
['dev-libs/ace'. 'game-board/ace']
libnet is an ambiguous package name, candidates are
['dev-perl/libnet', 'net-libs/libnet]

I also haven't a clue of how to deal with injected packages.

i.e.
ignoring broken log entry for nasm-0.98.36 (likely injected)

Suggestions? Advice?

:-)
Comment 5 Marius Caldas 2004-01-19 15:01:40 UTC
Hello Marius, this is Marius :-) Thanks for the new script, it helped fix my problem. Since I'm not completly familiar with Python and the internal design of Portage, I lost a lot of time trying to get my workstation fixed by brute-force methods like re-stage3'ing. Of course it didn't help but only made my problems worse.
Is it possible to add functionality to portage to detect that a user has the old naming scheme in either the world file and/or the package.(un)mask files so that a portage newbie doesn't get so lost when portage breaks with ugly error messages ?
That would help a lot of people when upgrading to 2.0.50.
Thanks.
Comment 6 herve coatanhay 2004-01-23 16:34:57 UTC
It seems /usr/lib/portage/bin/regenworld.sh looks in /var/log/regenworld for new keys.

I had the same with : dev-python/Imaging-py21-1.1.4
                      null/quake3-urbanterror-3

I think the following lines in my emerge.log to be responsible :

1056725890:  *** emerge --update --deep dev-python/Imaging-py21-1.1.4
1061332510:  *** emerge  unmerge quake3-urbanterror-3

it must be a regexp problem in regenworld.sh.
Comment 7 Ed Catmur 2004-01-26 00:48:13 UTC
Hmm. I've `fixed' it by inserting this line into /usr/lib/portage/bin/regenworld.sh:

gawk '/^[a-z/-]*-[0-9]/ { print "="$0 }' |

Ugly hack - but it works.
Comment 8 Marius Mauch (RETIRED) gentoo-dev 2004-02-04 18:39:39 UTC
Nick, this should go into portage before 2.0.50 goes stable
Comment 9 Tony Vroon (RETIRED) gentoo-dev 2004-02-05 14:28:18 UTC
Attached script works for me.
Had a similar backtrace to what was reported with -pre22.
Comment 10 Marius Mauch (RETIRED) gentoo-dev 2004-02-09 09:31:41 UTC
It's in 2.0.50