Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 19742 - emerge depclean has an off-by-one error that can result in system packages being cleaned
Summary: emerge depclean has an off-by-one error that can result in system packages be...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Nicholas Jones (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-21 21:52 UTC by Mr. Bones. (RETIRED)
Modified: 2011-10-30 22:19 UTC (History)
1 user (show)

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


Attachments
patch to fix depclean (emerge.patch,502 bytes, patch)
2003-04-21 21:54 UTC, Mr. Bones. (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mr. Bones. (RETIRED) gentoo-dev 2003-04-21 21:52:36 UTC
emerge depclean on a newly installed system tells me that it will remove
sys-apps/modutils.  This is obviously wrong.

Tracked it down to some dubious code in the depclean portion of emerge.  I think
it will always happen if there is a system package at the end of alldeps.  It
may be related to virtuals or not, I didn't track it down further once I had
it fixed.

Patch will be attched.

Reproducible: Didn't try
Steps to Reproduce:
1. installed 1.4-r4 + some of the usual things I install
2. emerge -p depclean

Actual Results:  
emerge tells me it would like to clean sys-apps/modutils

Expected Results:  
Just remove the things that aren't really needed please.

Portage 2.0.47-r10 (default-1.0, gcc-2.95.3, glibc-2.2.5-r2,2.2.5-r8)
=================================================================
System uname: 2.4.19-gentoo-r9 i586 Pentium MMX
GENTOO_MIRRORS="http://gentoo.oregonstate.edu/
http://www.ibiblio.org/pub/Linux/distributions/gentoo
http://csociety-ftp.ecn.purdue.edu/pub/gentoo"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config
/usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb"
CONFIG_PROTECT_MASK="/etc/bash_completion /usr/X11R6/lib/X11/xkb
/etc/X11/serverconfig /etc/X11/starthere /etc/ssmtp /etc/sound/events
/etc/X11/rstart /etc/X11/xdm /etc/pango /etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY="/usr/local/portage"
USE="x86 oss 3dnow apm crypt cups encode libg++ mikmod mmx mpeg ncurses pdflib
spell truetype xml2 xv berkdb esd gdbm gif gnome gnome-libs gtk guile libwww
oggvorbis pam perl png python readline slang snmp ssl tcpd tetex tiff X -java
-xmms -jpeg -avi -dvd -opengl -doc -quicktime -sdl -svga -motif -nls -imlib -kde
-qt -arts gpm mozilla gtk2"
COMPILER=""
CHOST="i586-pc-linux-gnu"
CFLAGS="-march=i586 -O3 -pipe"
CXXFLAGS="-march=i586 -O3 -pipe"
ACCEPT_KEYWORDS="x86"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
FEATURES="sandbox ccache"


Here's the relevent emerge info output, but it's the same code and I assume the
same behavior in portage-2.0.48_pre2
Comment 1 Mr. Bones. (RETIRED) gentoo-dev 2003-04-21 21:54:18 UTC
Created attachment 10970 [details, diff]
patch to fix depclean

This fixes the problem I saw with depclean and I think it improves the code
at the same time.  At least it works for me and if it's not the right fix will
at least give carpaski something to look at.
Comment 2 Seth Chandler 2003-04-22 03:11:08 UTC
nick can you take a look at this?  i havn't had a chance to verify...
Comment 3 Nicholas Jones (RETIRED) gentoo-dev 2003-04-28 02:24:19 UTC
It's kind of odd to see that code written the way it was... I don't know
why I would have used a range like that.

Patch is in for >=48_pre3