emerge --pretend --resume crashes. (portage 2.0.50-r8). Reproducible: Always Steps to Reproduce: 1. emerge --pretend --resume Actual Results: Example 1: pixel root # emerge --resume --pretend These are the packages that I would merge, in order: Traceback (most recent call last): File "/usr/bin/emerge", line 2576, in ? mydepgraph.display(portage.mtimedb["resume"]["mergelist"]) File "/usr/bin/emerge", line 1278, in display if ebuild_iuse in self.applied_useflags[x[2]]: KeyError: 'sys-devel/gcc-3.3.3-r6' Example 2: marshmallow root # emerge --resume --pretend These are the packages that I would merge, in order: Traceback (most recent call last): File "/usr/bin/emerge", line 2576, in ? mydepgraph.display(portage.mtimedb["resume"]["mergelist"]) File "/usr/bin/emerge", line 1278, in display if ebuild_iuse in self.applied_useflags[x[2]]: KeyError: 'kde-base/kdenetwork-3.2.2' Expected Results: I should see a list of all the packages which will be emerged from the point of resumption. Example 1: Portage 2.0.50-r8 (default-x86-2004.0, gcc-3.3.2, glibc-2.3.2-r9, 2.4.26) ================================================================= System uname: 2.4.26 i686 Intel(R) Pentium(R) III CPU 1133MHz Gentoo Base System version 1.4.16 distcc 2.13 i386-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" AUTOCLEAN="yes" CFLAGS="-pipe -O3 -march=pentium3 -fomit-frame-pointer -fprefetch-loop-arrays -ffast-math -fforce-addr -falign-functions=4" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-pipe -O3 -march=pentium3 -fomit-frame-pointer -fprefetch-loop-arrays -ffast-math -fforce-addr -falign-functions=4" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache distcc sandbox" GENTOO_MIRRORS="http://212.219.247.20/sites/www.ibiblio.org/gentoo/ http://212.219.247.15/sites/www.ibiblio.org/gentoo/ http://ftp.easynet.nl/mirror/gentoo/ http://212.219.247.21/sites/www.ibiblio.org/gentoo/" MAKEOPTS="-j6" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://192.168.2.34/gentoo-portage" USE="acpi apache2 apm arts avi berkdb crypt cups curl encode fbcon foomaticdb gd gdbm gif gpm gtk2 imap imlib jpeg libg++ libwww mad mcal md5sum mikmod mmx motif mpeg mysql ncurses nls offensive oggvorbis opengl oss pam pcmcia pdflib perl pic png pnp python quicktime readline samba sdl slang spell sse ssl svga tcpd tiff truetype unicode usb vhosts x86 xml2 xmms xv zlib" Example 2: Portage 2.0.50-r8 (default-x86-1.4, gcc-3.3.3, glibc-2.3.3.20040420-r0, 2.6.5-gentoo-r1) ================================================================= System uname: 2.6.5-gentoo-r1 i686 AMD Athlon(tm) processor Gentoo Base System version 1.4.16 distcc 2.13 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.59-r3 Automake: sys-devel/automake-1.8.3 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O3 -march=athlon -funroll-loops -pipe -fomit-frame-pointer -ffast-math -falign-functions=4 -falign-loops=4 -mmmx -m3dnow" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3/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/terminfo /etc/env.d" CXXFLAGS="-O3 -march=athlon -funroll-loops -pipe -fomit-frame-pointer -ffast-math -falign-functions=4 -falign-loops=4 -mmmx -m3dnow" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache distcc sandbox" GENTOO_MIRRORS="http://www.mirror.ac.uk/sites/www.ibiblio.org/gentoo" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow X X509 Xaw3d aalib accessibility aci8 acl acpi adbc adns alsa apache2 arts avi berkdb caps cdr crypt cscope cups curl dga directfb doc dvd dvdr encode esd ethereal evo fam fastcgi fbcon flac flash floomaticdb foomaticdb gd gdbm ggi gif gmp gstreamer gtk gtk2 idea imap imlib innodb ipv6 java javascript jikes jpeg junit justify kde ladcca ldap libcaca libg++ libwww mad maildir mailwrapper mbox mcal md5sum mikmod mmx motif mozilla mpeg mpi mysql nas ncurses nls nocardbus nptl objc oggvorbis opengl oss pam pda pdflib perl pic pmg png postgres ppds python qt quicktime readline ruby samba sasl scanner sdl skey slang slp snmp speex spell ssl svga tcltk tcpd tetex tetx theora threads tiff truetype unicode usb v4l video_cards_sis videos wifi wmf wxwindows x509 x86 xml xml2 xmms xv xvid zeo zlib"
Test in a recent portage and reopen if still a bug.
The bug is still there, I'm using Portage 2.0.51_rc7 Here the output: # emerge -p --resume These are the packages that I would merge, in order: Traceback (most recent call last): File "/usr/bin/emerge", line 2862, in ? mydepgraph.display(portage.mtimedb["resume"]["mergelist"]) File "/usr/bin/emerge", line 1468, in display now_use=self.applied_useflags[x[2]] KeyError: 'media-gfx/splashutils-0.9_pre10' This bug has been there for a very long time. In fact, I have never been able to run --resume --pretend before, it was always the same error message that was outputted. I actually thought there would be more reports on that issue.
The original emerge is run with "--verbose". The following "emerge --pretend --resume" tries to do the standard verbose output and print the USE flags. However, the USE flags (specifically, depgraph.applied_useflags[]) are only stored when building the dep graph.
still happens... also, note that this could cause undesired behaviour if a USE flag is manually defined on the origional command, and "emerge --resume" will not use those flags when resuming smithj ~ # emerge -pv --resume These are the packages that I would merge, in order: Traceback (most recent call last): File "/usr/bin/emerge", line 3147, in ? mydepgraph.display(portage.mtimedb["resume"]["mergelist"]) File "/usr/bin/emerge", line 1555, in display now_use=self.applied_useflags[x[2]] KeyError: 'net-print/foomatic-db-engine-3.0.2' smithj ~ # echo $? 1 Portage 2.0.51.21-r1 (default-linux/x86, gcc-3.4.3-20050110, glibc-2.3.5-r0, 2.6.12-rc4 i686) ================================================================= System uname: 2.6.12-rc4 i686 Intel(R) Celeron(R) CPU 2.00GHz Gentoo Base System version 1.6.11 ccache version 2.4 [enabled] dev-lang/python: 2.3.5 sys-apps/sandbox: 1.2.5-r1 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5 sys-devel/binutils: 2.15.92.0.2-r8 sys-devel/libtool: 1.5.16 virtual/os-headers: 2.6.11 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=pentium4 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/alias /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=pentium4 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache cvs digest distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.us.gentoo.org/gentoo-portage" USE="x86 X aalib acpi aim alsa apache2 avi bitmap-fonts cdr crypt cups dba divx4linux dvd encode esd flac fluxbox font-server ftp gd gd-external gif gnome gtk gtk2 icq idea imap imlib java jikes jpeg mad mmx mozilla mp3 mpeg ncurses nptl nptlonly ogg oggvorbis opengl pam pcmcia php pic png posix python samba sdl spell sse sse2 ssl tcltk tcpd tiff truetype truetype-fonts type1-fonts udev usb vim vorbis xmms xprint xv xvid userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTDIR_OVERLAY
Confirmed in both stable and CVS, can we just say -v is not valid for --resume, or store/regen the use flags? A question brought up in IRC, you mentioned above that the USE flags are only used to create the depgraph at emerge time, and are unavailable during the --resume stage; am I reading that correctly? If one were to do something like 'USE="-acl" emerge -e world' '^C' 'emerge --resume' would the command line USE still be in affect in the ebuilds, or just the depgraph generation?
re comment 5: > If one were to do something like 'USE="-acl" emerge -e world' '^C' 'emerge --resume' would the command line USE still be in affect in the ebuilds, or just the depgraph generation? as i understand it, command line USE flags will be dropped, but their effects on depgraphs will remain. thus, if you specified USE="gtk" on the command line, gtk will be installed, but the package itself will not be compiled to use it then again, i am not very familiar with portage internals...
Seems like this is already covered, but I got this error running emerge with resume: host ~ # emerge -va --resume openoffice These are the packages that I would merge, in order: Traceback (most recent call last): File "/usr/bin/emerge", line 3014, in ? mydepgraph.display(portage.mtimedb["resume"]["mergelist"]) File "/usr/bin/emerge", line 1521, in display now_use=self.applied_useflags[x[2]] KeyError: 'app-office/openoffice-1.1.4-r1'
Fixed on or before 2.0.51.22-r1
Looking through the batch of bugs, I'm not sure that some of these are actually fixed in stable. Others, the requirements have possibly changed after the initial fix was committed. If you think this bug has been closed incorrectly, please reopen or ask that it be reopened.
Reproducable on stable: torx ~ # emerge --info Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-2.3.5- r1, 2.6.12-gentoo-r6 i686) ================================================================= System uname: 2.6.12-gentoo-r6 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz Gentoo Base System version 1.6.13 ccache version 2.3 [disabled] dev-lang/python: 2.3.5 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-mcpu=pentium4 -march=pentium4 -O2 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/ 3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kd e/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xk b /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-mcpu=pentium4 -march=pentium4 -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig buildpkg distlocks sandbox sfperms strict userpr iv usersandbox" GENTOO_MIRRORS="http://gentoo.chem.wisc.edu/gentoo http://gentoo.osuosl.org http ://www.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X alsa apache2 apm avi bash-completion berkdb bitmap-fonts cdr cjk cryp t cups curl dvd dvdr dvdread eds emboss encode esd fam flac foomaticdb fortran f reetype gdbm gif gnome gpm gstreamer gtk gtk2 imagemagick imap imlib ipv6 jack j peg ldap libg++ libwww lm_sensors mad matroska mikmod motif mozilla mp3 mpeg ncu rses nis nls ntpl ntpl-only offensive ogg oggvorbis openal opengl pam pdflib per l php pic png posix python quicktime readline samba sdl spell sqlite ssl svga tc pd threads tiff truetype truetype-fonts type1-fonts unicode vorbis wxwindows xin e xinerama xml2 xmms xprint xv zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Fixed in 2.0.53_rc4
Please reopen. I can still reproduce the bug (no command-line useflags, but original emerge was verbose): # emerge -p --resume These are the packages that I would merge, in order: Traceback (most recent call last): File "/usr/bin/emerge", line 3198, in ? mydepgraph.display(portage.mtimedb["resume"]["mergelist"]) File "/usr/bin/emerge", line 1584, in display now_use=self.applied_useflags[x[2]] KeyError: 'media-gfx/splashutils-1.1.9.10-r1' # emerge --info Portage 2.0.54 (default-linux/x86/2006.0, gcc-3.4.5, glibc-2.3.5-r2, 2.6.15-gentoo-r1 i686) ================================================================= System uname: 2.6.15-gentoo-r1 i686 Intel(R) Celeron(R) CPU 2.26GHz Gentoo Base System version 1.6.14 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] dev-lang/python: 2.3.5, 2.4.2-r1 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=prescott -O3 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /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/splash /etc/terminfo /etc/env.d" CXXFLAGS="-march=prescott -O3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig collision-protect distclean distlocks sandbox sfperms strict userpriv usersandbox" GENTOO_MIRRORS="http://cudlug.cudenver.edu/gentoo/ http://gentoo.osuosl.org/ http://gentoo.cites.uiuc.edu/pub/gentoo/ ftp://cudlug.cudenver.edu/pub/mirrors/distributions/gentoo/ http://mirror.espri.arizona.edu/gentoo/ http://mirror.usu.edu/mirrors/gentoo/ ftp://mirror.usu.edu/mirrors/gentoo/ http://gentoo.mirrors.easynews.com/linux/gentoo/ http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.us.gentoo.org/gentoo-portage" USE="x86 X acpi alsa apache2 apm arts audiofile avi bash-completion berkdb bitmap-fonts browserplugin bzip2 cdr clamav crypt cups curl dga dio doc dri eds emboss encode examples exif expat fam fbcon ffmpeg flac foomaticdb fortran gb gd gdbm gif glut gmp gpm gstreamer gtk gtk2 gtkhtml guile hal idn imagemagick imlib ipv6 java javascript jpeg junit kde kdeenablefinal lcms libg++ libwww mad mikmod mmx mng mono motif mozilla mp3 mpeg ncurses nls nptl nvidia ogg opengl oss pam pcre pda pdflib perl png python qt quicktime readline samba scanner sdl session spell ssl symlink tcpd tetex tidy tiff truetype truetype-fonts type1-fonts udev unicode usb vorbis wmf xml xml2 xmms xv xvid zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Created attachment 81951 [details, diff] fix from 2.1 If you save this as /tmp/myresumeopts.patch, you can apply it as follows: cd /usr/lib/portage patch -p0 < /tmp/myresumeopts.patch
The patch could go in a 2.0.55 release.
*** Bug 125633 has been marked as a duplicate of this bug. ***
OK, that patch seems to fix it for the most part (ie it works both with and without used with -v/--verbose in original emerge). However, if you add the -t or --tree option on the original emerge, then emerge -p --resume fails. eg: emerge -at splashutils yes ctrl-c emerge -p --resume result: These are the packages that I would merge, in order: Traceback (most recent call last): File "/usr/bin/emerge", line 3197, in ? mydepgraph.display(portage.mtimedb["resume"]["mergelist"]) File "/usr/bin/emerge", line 1643, in display indent=" "*mygraph.depth(string.join(x)) File "/usr/lib/portage/pym/portage.py", line 420, in depth while (self.dict[mykey][1]): KeyError: 'ebuild / media-gfx/splashutils-1.1.9.10-r1 merge'
Created attachment 81952 [details, diff] exclude skipfirst, ask, verbose, and tree from myresumeopts (In reply to comment #16) > OK, that patch seems to fix it for the most part (ie it works both with and > without used with -v/--verbose in original emerge). However, if you add the -t > or --tree option on the original emerge, then emerge -p --resume fails. Thanks, the updated patch includes "--tree" with the others.
Yup. That does it. I can now do "emerge -auDNvt world" "yes" '^c' "emerge -p --resume" without error. It'd be nice to still see the tree in the resume, but that'd probably require major changes and I don't particularly care enough to file a feature request in a new bug. This solution works for me.
Zac, you worked quite a bit on the resume code in 2.1, is this one fixed?
Yeah, this should have been fixed in portage-2.1.