Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 268246 - sys-apps/portage-2.1.6.11: emerge -p --depclean exits with 0 even when it fails
Summary: sys-apps/portage-2.1.6.11: emerge -p --depclean exits with 0 even when it fails
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-02 08:15 UTC by Pacho Ramos
Modified: 2009-06-10 18:59 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 Pacho Ramos gentoo-dev 2009-05-02 08:15:15 UTC
Now, if I run emerge -p --depclean I get:
 # emerge -p --depclean

 * Depclean may break link level dependencies.  Thus, it is
 * recommended to use a tool such as `revdep-rebuild` (from
 * app-portage/gentoolkit) in order to detect such breakage.
 * 
 * Always study the list of packages to be cleaned for any obvious
 * mistakes. Packages that are part of the world set will always
 * be kept.  They can be manually added to this set with
 * `emerge --noreplace <atom>`.  Packages that are listed in
 * package.provided (see portage(5)) will be removed by
 * depclean, even if they are part of the world set.
 * 
 * As a safety measure, depclean will not remove any packages
 * unless *all* required dependencies have been resolved.  As a
 * consequence, it is often necessary to run `emerge --update
 * --newuse --deep world` prior to depclean.

Calculating dependencies... done!
 * Dependencies could not be completely resolved due to
 * the following required packages not being installed:
 * 
 *   >=virtual/perl-IO-Compress-Bzip2-2.012 pulled in by:
 *     perl-core/Archive-Tar-1.40
 * 
 * Have you forgotten to run `emerge --update --newuse --deep world` prior
 * to depclean? It may be necessary to manually uninstall packages that no longer
 * exist in the portage tree since it may not be possible to satisfy their
 * dependencies.  Also, be aware of the --with-bdeps option that is documented
 * in `man emerge`.

If I run:
# echo $?
0

This is a bit annoying for me because I run some commands with "&&" and I would expect get them not run when depclean fails

My emerge --info:
Portage 2.1.6.11 (default/linux/amd64/2008.0/desktop, gcc-4.3.2, glibc-2.8_p20080602-r1, 2.6.29-tuxonice-r1 x86_64)
=================================================================
System uname: Linux-2.6.29-tuxonice-r1-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T9300_@_2.50GHz-with-glibc2.2.5
Timestamp of tree: Sat, 02 May 2009 08:00:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 2.1.7
dev-lang/python:     2.5.4-r2
dev-python/pycrypto: 2.0.1-r8
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/usr/distfiles"
FEATURES="autoaddcvs ccache cvs distlocks fixpackages multilib-strict parallel-fetch protect-owned sandbox sfperms strict test test-fail-continue unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.free.fr/mirrors/ftp.gentoo.org"
LANG="es_ES.UTF-8"
LC_ALL="es_ES.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="es es_ES en_US"
MAKEOPTS="-j3"
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="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/sunrise /usr/portage/local/layman/wschlich-testing /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 applet avahi bash-completion berkdb bluetooth branding bzip2 cairo cdda cddb cdinstall cdr cleartype cli consolekit cracklib crypt css cups daap dbus dell djvu dri dts dvd dvdr dvdread dvi eds emboss encode evo exif fam fat ffmpeg firefox flac fortran fuse gdbm gif git glitz gnome gnome-keyring gpm gstreamer gtk hal iconv ieee1394 imagemagick isdnlog java jpeg jpeg2k kdeenablefinal kdehiddenvisibility kpathsea laptop latex libnotify lm_sensors lyx lzma mad midi mikmod mmx mmxext mono mp3 mpeg mudflap multilib musicbrainz nautilus ncurses network network-cron networkmanager nls nptl nptlonly ntfs nvidia ogg opengl openmp pam pango pch pcre pdf perl png ppds pppd python qt3support qt4 quicktime readline reflection reiserfs scanner sdl session spell spl sse sse2 ssl ssse3 startup-notification subversion svg sysfs t1lib tcpd threads tiff truetype unicode usb v4l2 vcd vorbis webkit xattr xcb xinetd xml xmp xorg xpm xulrunner xv xvid zeroconf zlib" ALSA_CARDS="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 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" ELIBC="glibc" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="es es_ES en_US" USERLAND="GNU" VIDEO_CARDS="nvidia nv"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Thanks

Reproducible: Always
Comment 1 Torsten Veller (RETIRED) gentoo-dev 2009-05-02 08:43:41 UTC

*** This bug has been marked as a duplicate of bug 266861 ***
Comment 2 Pacho Ramos gentoo-dev 2009-05-02 13:17:40 UTC
I already knew the "perl" problem, but this is simply for exit status when emerge fails, that it "0" when it should be other one

Thanks
Comment 3 Sebastian Luther (few) 2009-06-09 19:53:24 UTC
This is fixed in =sys-apps/portage-2.1.6.13.
Comment 4 Zac Medico gentoo-dev 2009-06-09 20:19:48 UTC
I don't think this is fixed because afaik action_depclean() always returns success.
Comment 5 Sebastian Luther (few) 2009-06-10 15:12:43 UTC
emerge --depclean
 * Always study the list of packages to be cleaned for any obvious
 * mistakes. Packages that are part of the world set will always
 * be kept.  They can be manually added to this set with
 * `emerge --noreplace <atom>`.  Packages that are listed in
 * package.provided (see portage(5)) will be removed by
 * depclean, even if they are part of the world set.
 * 
 * As a safety measure, depclean will not remove any packages
 * unless *all* required dependencies have been resolved.  As a
 * consequence, it is often necessary to run `emerge --update
 * --newuse --deep @system @world` prior to depclean.

Calculating dependencies... done!
 * Dependencies could not be completely resolved due to
 * the following required packages not being installed:
 * 
 *   >=virtual/perl-IO-Compress-Bzip2-2.012 pulled in by:
 *     perl-core/Archive-Tar-1.40
 * 
 * Have you forgotten to run `emerge --update --newuse --deep @system @world` prior
 * to depclean? It may be necessary to manually uninstall packages that no longer
 * exist in the portage tree since it may not be possible to satisfy their
 * dependencies.  Also, be aware of the --with-bdeps option that is documented
 * in `man emerge`.
fewslaptop mingramm # echo $?
1


On line 14357, unresolved_deps() is called. If this fails, action_depclean() returns 1.
Comment 6 Zac Medico gentoo-dev 2009-06-10 15:15:27 UTC
(In reply to comment #5)
> On line 14357, unresolved_deps() is called. If this fails, action_depclean()
> returns 1.

Oh, that's right. Thanks.
Comment 7 Pacho Ramos gentoo-dev 2009-06-10 18:59:57 UTC
Yes, I confirm the fix as I have see it today and now it behaved properly :-)

Thanks