Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 366723 - Emerge --resume after successful emerge runs entire emerge again
Summary: Emerge --resume after successful emerge runs entire emerge again
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: Normal minor with 1 vote (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-10 09:24 UTC by Tim Bowers
Modified: 2011-05-10 16:43 UTC (History)
0 users

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 Tim Bowers 2011-05-10 09:24:17 UTC
Not such a bug as a very weird behaviour (or normal if you wish to see it that way - either way it seems undesirable).

Basically if you do an emerge (for example emerge -uD world) - it may finish silently in a screen session and you don't realise. For some reason your not sure it finished correctly so you do emerge --resume.

You expect it'll pick up any packages it failed to emerge, BUT if it didn't fail any, instead of simply "finishing", it runs the original emerge again in its entirely.

Reproducible: Always

Steps to Reproduce:
1. emerge -uD world
2. emerge finishes, user doesn't know/realise/see finished
3. emerge --resume
4. entire emerge -uD world runs
Actual Results:  
Whole emerge runs again pointlessly.

Expected Results:  
emerge --resume should simply finish with "no packages to emerge"

Could argue user should check emerge.log however I'm starting to think this could create strange race conditions with --resume and --keep-going where the emerge process could just keep respawning itself if it didn't catch the "all packages finished". I've not seen it yet but its plausible if emerge --resume doesn't work as expected.
Comment 1 Tim Bowers 2011-05-10 09:25:42 UTC
Portage 2.1.9.42 (!../usr/portage/profiles/default/linux/amd64/10.0, gcc-4.4.5, libc-0-r0, 2.6.37-gentoo-r4 x86_64)
=================================================================
System uname: Linux-2.6.37-gentoo-r4-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4600+-with-gentoo-2.0.2
Timestamp of tree: Tue, 10 May 2011 01:15:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [enabled]
ccache version 2.4 [enabled]
app-shells/bash:     4.1_p9
dev-lang/python:     2.7.1-r1, 3.1.3-r1
dev-util/ccache:     2.4-r9
dev-util/cmake:      2.8.4
sys-apps/baselayout: 2.0.2
sys-apps/openrc:     0.8.2-r1
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.65-r1
sys-devel/automake:  1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.5
sys-devel/gcc-config: 1.4.1-r1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
sys-kernel/linux-headers: 2.6.36.1
sys-libs/glibc:      2.11.3
virtual/os-headers:  0
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64-sse3 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/openvpn/easy-rsa /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=athlon64-sse3 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs ccache distcc distlocks fixlafiles fixpackages news nodoc noinfo parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="ftp://mirror.bytemark.co.uk/gentoo/ http://mirror.bytemark.co.uk/gentoo/ rsync://mirror.bytemark.co.uk/gentoo/ ftp://mirror.qubenet.net/mirror/gentoo/ http://mirror.qubenet.net/mirror/gentoo/ rsync://rsync.mirrorservice.org/www.ibiblio.org/gentoo/ http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/ ftp://ftp.mirrorservice.org/sites/www.ibiblio.org/gentoo/ ftp://gentoo.virginmedia.com/sites/gentoo http://gentoo.virginmedia.com/"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_GB en"
MAKEOPTS="-j5"
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="/home/tim/.portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.uk.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext aac aalib acl acpi alsa amd64 amr apache2 avi berkdb bzip2 cddb cdparanoia cli consolekit cpudetection cracklib crypt cups cxx daemon dbus dri dvb embedded extensions extras ffmpeg fortran gdbm gif gpm iconv jpeg mmx modules moonlight mp3 mpeg mudflap multilib ncurses nls nptl nptlonly openmp pam pcre perl png policykit pppd python qt3support readline sdl session sse sse2 ssl sysfs tcpd unicode v4l v4l2 vdpau xorg xulrunner xvid zlib" ALSA_CARDS="snd-hda-intel" 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" 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="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XFCE_PLUGINS="menu" 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, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


emerge.log showing resume starting up the same emerge as previously run:
1305016931: Started emerge on: May 10, 2011 09:42:11
1305016931:  *** emerge --deep --ask --update world
1305017028:  >>> emerge (1 of 8) sys-libs/timezone-data-2011e to /
1305017028:  === (1 of 8) Cleaning (sys-libs/timezone-data-2011e::/home/tim/.portage/sys-libs/timezone-data/timezone-data-2011e.ebuild)
1305017030:  === (1 of 8) Compiling/Merging (sys-libs/timezone-data-2011e::/home/tim/.portage/sys-libs/timezone-data/timezone-data-2011e.ebuild)
1305017048:  === (1 of 8) Merging (sys-libs/timezone-data-2011e::/home/tim/.portage/sys-libs/timezone-data/timezone-data-2011e.ebuild)
1305017055:  >>> AUTOCLEAN: sys-libs/timezone-data:0
1305017055:  === Unmerging... (sys-libs/timezone-data-2011d)
1305017059:  >>> unmerge success: sys-libs/timezone-data-2011d
1305017060:  === (1 of 8) Post-Build Cleaning (sys-libs/timezone-data-2011e::/home/tim/.portage/sys-libs/timezone-data/timezone-data-2011e.ebuild)
1305017060:  ::: completed emerge (1 of 8) sys-libs/timezone-data-2011e to /
1305017060:  *** terminating.
1305017070: Started emerge on: May 10, 2011 09:44:30
1305017070:  *** emerge --deep --update world
1305017078:  >>> emerge (1 of 7) dev-libs/libevent-2.0.10 to /
1305017078:  === (1 of 7) Cleaning (dev-libs/libevent-2.0.10::/home/tim/.portage/dev-libs/libevent/libevent-2.0.10.ebuild)
1305017078:  === (1 of 7) Compiling/Merging (dev-libs/libevent-2.0.10::/home/tim/.portage/dev-libs/libevent/libevent-2.0.10.ebuild)
1305017145:  === (1 of 7) Merging (dev-libs/libevent-2.0.10::/home/tim/.portage/dev-libs/libevent/libevent-2.0.10.ebuild)
1305017147:  >>> AUTOCLEAN: dev-libs/libevent:0
1305017147:  === Unmerging... (dev-libs/libevent-1.4.14b)
1305017151:  >>> unmerge success: dev-libs/libevent-1.4.14b
1305017153:  === (1 of 7) Post-Build Cleaning (dev-libs/libevent-2.0.10::/home/tim/.portage/dev-libs/libevent/libevent-2.0.10.ebuild)
1305017153:  ::: completed emerge (1 of 7) dev-libs/libevent-2.0.10 to /
1305017153:  >>> emerge (2 of 7) media-libs/libv4l-0.8.3 to /
1305017153:  === (2 of 7) Cleaning (media-libs/libv4l-0.8.3::/home/tim/.portage/media-libs/libv4l/libv4l-0.8.3.ebuild)
1305017153:  === (2 of 7) Compiling/Merging (media-libs/libv4l-0.8.3::/home/tim/.portage/media-libs/libv4l/libv4l-0.8.3.ebuild)
1305017180:  === (2 of 7) Merging (media-libs/libv4l-0.8.3::/home/tim/.portage/media-libs/libv4l/libv4l-0.8.3.ebuild)
1305017182:  >>> AUTOCLEAN: media-libs/libv4l:0
1305017182:  === Unmerging... (media-libs/libv4l-0.8.1)
1305017183:  >>> unmerge success: media-libs/libv4l-0.8.1
1305017186:  === (2 of 7) Post-Build Cleaning (media-libs/libv4l-0.8.3::/home/tim/.portage/media-libs/libv4l/libv4l-0.8.3.ebuild)
1305017186:  ::: completed emerge (2 of 7) media-libs/libv4l-0.8.3 to /
1305017186:  >>> emerge (3 of 7) sys-apps/baselayout-2.0.2 to /
1305017186:  === (3 of 7) Cleaning (sys-apps/baselayout-2.0.2::/home/tim/.portage/sys-apps/baselayout/baselayout-2.0.2.ebuild)
1305017186:  === (3 of 7) Compiling/Merging (sys-apps/baselayout-2.0.2::/home/tim/.portage/sys-apps/baselayout/baselayout-2.0.2.ebuild)
1305017192:  === (3 of 7) Merging (sys-apps/baselayout-2.0.2::/home/tim/.portage/sys-apps/baselayout/baselayout-2.0.2.ebuild)
1305017194:  >>> AUTOCLEAN: sys-apps/baselayout:0
1305017194:  === Unmerging... (sys-apps/baselayout-1.12.14-r1)
1305017196:  >>> unmerge success: sys-apps/baselayout-1.12.14-r1
1305017198:  === (3 of 7) Post-Build Cleaning (sys-apps/baselayout-2.0.2::/home/tim/.portage/sys-apps/baselayout/baselayout-2.0.2.ebuild)
1305017198:  ::: completed emerge (3 of 7) sys-apps/baselayout-2.0.2 to /
1305017198:  >>> emerge (4 of 7) virtual/package-manager-0 to /
1305017198:  === (4 of 7) Cleaning (virtual/package-manager-0::/home/tim/.portage/virtual/package-manager/package-manager-0.ebuild)
1305017198:  === (4 of 7) Compiling/Merging (virtual/package-manager-0::/home/tim/.portage/virtual/package-manager/package-manager-0.ebuild)
1305017204:  === (4 of 7) Merging (virtual/package-manager-0::/home/tim/.portage/virtual/package-manager/package-manager-0.ebuild)
1305017206:  >>> AUTOCLEAN: virtual/package-manager:0
1305017207:  === (4 of 7) Post-Build Cleaning (virtual/package-manager-0::/home/tim/.portage/virtual/package-manager/package-manager-0.ebuild)
1305017207:  ::: completed emerge (4 of 7) virtual/package-manager-0 to /
1305017207:  >>> emerge (5 of 7) sys-apps/openrc-0.8.2-r1 to /
1305017207:  === (5 of 7) Cleaning (sys-apps/openrc-0.8.2-r1::/home/tim/.portage/sys-apps/openrc/openrc-0.8.2-r1.ebuild)
1305017207:  === (5 of 7) Compiling/Merging (sys-apps/openrc-0.8.2-r1::/home/tim/.portage/sys-apps/openrc/openrc-0.8.2-r1.ebuild)
1305017245:  === (5 of 7) Merging (sys-apps/openrc-0.8.2-r1::/home/tim/.portage/sys-apps/openrc/openrc-0.8.2-r1.ebuild)
1305017248:  >>> AUTOCLEAN: sys-apps/openrc:0
1305017252:  === (5 of 7) Post-Build Cleaning (sys-apps/openrc-0.8.2-r1::/home/tim/.portage/sys-apps/openrc/openrc-0.8.2-r1.ebuild)
1305017252:  ::: completed emerge (5 of 7) sys-apps/openrc-0.8.2-r1 to /
1305017252:  >>> emerge (6 of 7) net-analyzer/fail2ban-0.8.4-r3 to /
1305017252:  === (6 of 7) Cleaning (net-analyzer/fail2ban-0.8.4-r3::/home/tim/.portage/net-analyzer/fail2ban/fail2ban-0.8.4-r3.ebuild)
1305017252:  === (6 of 7) Compiling/Merging (net-analyzer/fail2ban-0.8.4-r3::/home/tim/.portage/net-analyzer/fail2ban/fail2ban-0.8.4-r3.ebuild)
1305017262:  === (6 of 7) Merging (net-analyzer/fail2ban-0.8.4-r3::/home/tim/.portage/net-analyzer/fail2ban/fail2ban-0.8.4-r3.ebuild)
1305017265:  >>> AUTOCLEAN: net-analyzer/fail2ban:0
1305017265:  === Unmerging... (net-analyzer/fail2ban-0.8.4-r2)
1305017267:  >>> unmerge success: net-analyzer/fail2ban-0.8.4-r2
1305017270:  === (6 of 7) Post-Build Cleaning (net-analyzer/fail2ban-0.8.4-r3::/home/tim/.portage/net-analyzer/fail2ban/fail2ban-0.8.4-r3.ebuild)
1305017270:  ::: completed emerge (6 of 7) net-analyzer/fail2ban-0.8.4-r3 to /
1305017270:  >>> emerge (7 of 7) app-text/ghostscript-gpl-8.71-r6 to /
1305017270:  === (7 of 7) Cleaning (app-text/ghostscript-gpl-8.71-r6::/home/tim/.portage/app-text/ghostscript-gpl/ghostscript-gpl-8.71-r6.ebuild)
1305017275:  === (7 of 7) Compiling/Merging (app-text/ghostscript-gpl-8.71-r6::/home/tim/.portage/app-text/ghostscript-gpl/ghostscript-gpl-8.71-r6.ebuild)
1305018374:  === (7 of 7) Merging (app-text/ghostscript-gpl-8.71-r6::/home/tim/.portage/app-text/ghostscript-gpl/ghostscript-gpl-8.71-r6.ebuild)
1305018377:  >>> AUTOCLEAN: app-text/ghostscript-gpl:0
1305018380:  === (7 of 7) Post-Build Cleaning (app-text/ghostscript-gpl-8.71-r6::/home/tim/.portage/app-text/ghostscript-gpl/ghostscript-gpl-8.71-r6.ebuild)
1305018380:  ::: completed emerge (7 of 7) app-text/ghostscript-gpl-8.71-r6 to /
1305018380:  *** Finished. Cleaning up...
1305018380:  *** exiting successfully.
1305018381:  *** terminating.
1305018434: Started emerge on: May 10, 2011 10:07:14
1305018434:  *** emerge --resume --verbose
1305018436:  *** Resuming merge...
1305018436:  >>> emerge (1 of 7) dev-libs/libevent-2.0.10 to /
1305018436:  === (1 of 7) Cleaning (dev-libs/libevent-2.0.10::/home/tim/.portage/dev-libs/libevent/libevent-2.0.10.ebuild)
1305018436:  === (1 of 7) Compiling/Merging (dev-libs/libevent-2.0.10::/home/tim/.portage/dev-libs/libevent/libevent-2.0.10.ebuild)
1305018452:  *** terminating.
Comment 2 Zac Medico gentoo-dev 2011-05-10 15:42:02 UTC
You can use `tail /var/log/emerge.log` to check if your last resume command completed successfully.

The reason that emerge --resume sometimes works even though the previous merge was successful is that emerge has a backup resume list. This is helpful for the common case in which people need to emerge a single package in order to fix some kind of build failure. Afterwards, the backup resume list is still available for them to use with emerge --resume.

The `emaint --fix cleanresume` command is available if you want to discard the backup resume list.
Comment 3 Tim Bowers 2011-05-10 16:02:16 UTC
Well could we patch in that it warns the user the previous emerge appeared to be successful, do they really wish to emerge again? [Y/n]
Comment 4 Zac Medico gentoo-dev 2011-05-10 16:43:40 UTC
I don't think emerge should ever ask for input unless the --ask option is explicitly specified. As a compromise, I suppose that we would simply show a warning message when the backup resume list is selected. Then the user would have a moment to abort with Ctrl-C.