Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 77669 - "emerge depclean" doesn't match "equery depends"
Summary: "emerge depclean" doesn't match "equery depends"
Status: RESOLVED DUPLICATE of bug 48195
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Dependencies (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-12 05:49 UTC by Adam
Modified: 2005-08-06 07:50 UTC (History)
2 users (show)

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 Adam 2005-01-12 05:49:43 UTC
I tried to do "emerge depclean" and it said a package would get removed, but when running "equery depends" on that package it had dependencies.  This is because depclean uses the ebuilds in /usr/portage, while equery uses the ones in /var/db/pkg, which are the ones actually installed and whose ebuild might have a version less than the one in /usr/portage.

I expect both commands to have the same result.

This bug was discovered through the following discussion on the Gentoo forums:

http://forums.gentoo.org/viewtopic.php?p=1966571


Reproducible: Always
Steps to Reproduce:




root>emerge info
Portage 2.0.51-r3 (default-linux/x86/2004.3, gcc-3.3.4, glibc-2.3.3.20040420-r2,
2.6.9-gentoo-r9 i686)
=================================================================
System uname: 2.6.9-gentoo-r9 i686 AMD Athlon(tm) XP 2500+
Gentoo Base System version 1.4.16
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.90.0.1.1-r3
Headers:  sys-kernel/linux-headers-2.4.21-r1
Libtools: sys-devel/libtool-1.5.2-r7
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /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/share/config /usr/lib/mozilla/defaults/pref
/usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks nostrip sandbox sfperms strict
userpriv usersandbox"
GENTOO_MIRRORS="http://gentoo.seren.com/gentoo ftp://mirrors.tds.net/gentoo
http://mirrors.tds.net/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 3dnow acl alsa arts avi bitmap-fonts cdr crypt cups dvd encode fam
foomaticdb gdbm gif gpm gtk2 imagemagick imlib ipv6 java jpeg junit kde libwww
mmx mozilla mpeg mysql ncurses oggvorbis opengl pam pdflib perl png ppds qt
quicktime readline scanner sdl slang ssl tcpd tiff truetype usb xml2 xmms xprint
zlib"
Comment 1 Jason Stubbs (RETIRED) gentoo-dev 2005-05-09 03:38:59 UTC
depclean is broken. It even says that your current have an affect.
Comment 2 Peter Hyman 2005-07-12 15:59:21 UTC
Here is a specific example:

# emerge -p --depclean
....
 media-libs/libungif
    selected: 4.1.3
   protected: none
     omitted: none

>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.


Packages installed:   692
Packages in world:    114
Packages in system:   59
Unique package names: 669
Required packages:    685
Number to remove:     21

mars peter # equery d libungif
[ Searching for packages depending on libungif... ]
media-libs/imlib2-1.2.0-r2

which was installed as a dependency, but is not in world.
=======================
mars peter # emerge info
Portage 2.0.51.22-r1 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-2.3.4.
                                                                           
20041102-r1, 2.6.11.11 i686)
=================================================================
System uname: 2.6.11.11 i686 AMD Athlon(tm) XP 2800+
Gentoo Base System version 1.6.12
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.10
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="-O2 -march=i686 -fomit-frame-pointer"
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/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=i686 -fomit-frame-pointer"
DISTDIR="/mnt/src/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo ftp://gentoo.mirrors.tds.net/g
                                                                           
entoo http://mirror.clarkson.edu/pub/distributions/gentoo/ ftp://206.75.217.180/
                                                                           
"
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 apm arts artswrappersuid avi berkdb bitmap-fonts cdr crypt cups
                                                                            
curl eds emboss encode esd fam flac foomaticdb fortran gd gdbm gif gnome gpm gtk
                                                                           
 gtk2 imagemagick imlib ipv6 java jpeg kde ldap libg++ libwww mad mikmod motif m
                                                                           
ozilla mp3 mpeg mysql ncurses nls ogg oggvorbis opengl oss pam pdflib perl png p
                                                                           
ython qt quicktime readline samba sdl slang spell ssl svga tcltk tcpd tiff truet
                                                                           
ype truetype-fonts type1-fonts vorbis xine xml2 xmms xv zlib userland_GNU kernel
                                                                           
_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 3 Peter Hyman 2005-07-12 16:04:58 UTC
SOrry to post again, but could the problem be with the RDEPEND and DEPEND values
in packages. Afterall, if _some_ packages need a lib for building, but not for
running, might that affect things? Of course, in my case, pam comes up for
removal as well as devfsd. These two make no sense:

 sys-fs/devfsd
    selected: 1.3.25-r8
   protected: none
     omitted: none

 sys-libs/pam
    selected: 0.78-r2
   protected: none
     omitted: none


mars peter # equery d pam
[ Searching for packages depending on pam... ]
app-admin/sudo-1.6.8_p9
app-misc/mc-4.6.0-r14
dev-libs/cyrus-sasl-2.1.20-r2
kde-base/kdebase-pam-4
net-fs/samba-3.0.10
net-misc/openssh-3.9_p1-r2
net-print/cups-1.1.23-r1
sys-apps/util-linux-2.12i-r1
sys-apps/shadow-4.0.7-r3
sys-apps/pam-login-3.17
sys-process/vixie-cron-4.1-r7
x11-misc/xscreensaver-4.22-r2
Comment 4 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-08-06 07:45:16 UTC
emerge --depclean and equery "depends" use two different methods to determine 
dependencies.  --depclean takes into account your current operating environment 
when calculating deps...try a USE="-*" emerge --depclean -p to see depclean pull 
out TONS of things that are dependencies.

For the odd behavior of depclean, you will want to check your world file as well 
as any USE flag changes.
Comment 5 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-08-06 07:50:18 UTC
Actually...
Comment 6 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-08-06 07:50:48 UTC

*** This bug has been marked as a duplicate of 48195 ***