Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 36880 - emerge --resume --skipfirst fails when used twice
Summary: emerge --resume --skipfirst fails when used twice
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Ebuild Support (show other bugs)
Hardware: All Linux
: High minor
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2003-12-31 04:32 UTC by Andre Hinrichs
Modified: 2004-02-08 17:55 UTC (History)
0 users

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


Attachments
This patch causes portage to take the proper action when the --resume and --skipfirst arguments are passed to emerge. (emerge.skipfirst.patch,444 bytes, patch)
2004-01-26 20:00 UTC, David Renie
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andre Hinrichs 2003-12-31 04:32:18 UTC
I rebuilt all packages with 'emerge -Deu world'.
After having a problem with gnucash I restarted the build with --resume --skipfirst
Then I wanted to skip openoffice to save some time. I wanted to start that build over the next night. But when I stopped the emerge and restarted again with 'emerge -Deu --resume --skipfirst' the openoffice package started again. I tried that three times with the same result. Then I removed the '--skipfirst' option which caused emerge to rebuild the package already done before openoffice. So I let it run until end and the emerge of openoffice started again. I killed it again and added the '--skipfirst' option and then the package was really skipped.


Reproducible: Always
Steps to Reproduce:
1. emerge -Deu world
2. emerge -Deu --resume --skipfirst world
3. emerge -Deu --resume --skipfirst world




Portage 2.0.49-r15 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r3, 2.6.0-gentoo)
=================================================================
System uname: 2.6.0-gentoo i686 AMD Athlon(tm) Processor
Gentoo Base System version 1.4.3.10
distcc 2.11.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-mcpu=athlon -O3 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config
/usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O2 -mcpu=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="sandbox ccache autoaddcvs distcc"
GENTOO_MIRRORS="http://192.168.68.2/"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://192.168.68.2/gentoo-portage"
USE="x86 oss apm avi crypt cups encode foomaticdb gtk2 gnome libg++ mad mikmod
mpeg ncurses nls pdflib quicktime spell xmms xv zlib gtkhtml gdbm berkdb slang
readline arts svga java guile X sdl gpm tcpd pam libwww ssl python esd imlib
oggvorbis gtk qt kde motif opengl ldap scanner aalib apache2 bonobo curl dvd
emacs flash gd ggi gif jpeg lcms mozilla mysql perl png tcltk tetex tiff
truetype usb wmf xml xml2 Xaw3d"
Comment 1 Nicholas Jones (RETIRED) gentoo-dev 2004-01-06 00:10:08 UTC
emerge --resume --skipfirst
is all you should be doing.

Post the relevant parts of the log please.
/var/log/emerge.log
Comment 2 David Marcin 2004-01-26 19:38:29 UTC
Actually, in my opinion this is a bug.  The behavior of emerge --resume --skipfirst is faulty.  Yes, I have tested this, and the way it works is as follows:

"emerge A B C D E" ought to emerge packages A, B, C, D, and E
Suppose we let A complete, then package B fails.
"emerge --resume" would attempt to re-emerge package B (and likely fail)
"emerge --resume --skipfirst" would skip B, and resume with package C.
Suppose package C finishes, but the for some reason package D also fails.
At this point we have just completed package C with "emerge --resume --skipfirst", and we wish to skip package D.
The command "emerge --resume --skipfirst" will incorrectly resume with package D, while "emerge --resume" will resume with package C.
The correct behavior ought to be "emerge --resume" resumes with package D, and "emerge --resume --skipfirst" resumes with package E.

It appears to be a problem with the way portage handles the list of remaining packages to be emerged when executing "emerge --resume --skipfirst". It ought to simply nuke the first entry in the list, rather than just keep an offset of 1 through the remainder of the emerge.

This is especially a problem if packages B and C both fail, as there is no way to skip both of them, since skipfirst does not stack.
Comment 3 David Renie 2004-01-26 20:00:42 UTC
Created attachment 24474 [details, diff]
This patch causes portage to take the proper action when the --resume and --skipfirst arguments are passed to emerge.
Comment 4 Marius Mauch (RETIRED) gentoo-dev 2004-02-08 17:55:11 UTC
supposed to be fixed in 2.0.50 which is stable now. If this bug is not fixed please reopen.