If I try to upgrade file I get the following which is normal. cloud distfiles # USE="python" emerge -up file These are the packages that I would merge, in order: Calculating dependencies ...done! [ebuild U ] sys-libs/readline-5.0-r2 [4.3-r5] [ebuild U ] sys-devel/flex-2.5.4a-r6 [2.5.4a-r5] [ebuild U ] sys-devel/bc-1.06-r6 [1.06-r5] [ebuild U ] sys-apps/diffutils-2.8.7-r1 [2.8.7] [ebuild U ] sys-devel/libperl-5.8.6-r1 [5.8.5] [ebuild U ] dev-lang/perl-5.8.6-r5 [5.8.5-r5] [ebuild U ] dev-libs/openssl-0.9.7e-r1 [0.9.7e] [ebuild N ] app-admin/perl-cleaner-1.01 [ebuild U ] sys-libs/zlib-1.2.3 [1.2.2] [ebuild U ] dev-lang/python-2.3.5 [2.3.4-r1] [ebuild U ] sys-apps/file-4.13 [4.12] However, if I use -python, portage still wants to upgrade python even if the packages doesn't depend on it anymore due to the -python USE flag. Reproducible: Always Steps to Reproduce: 1. USE="-python" emerge -up file 2. 3. Actual Results: cloud distfiles # USE="-python" emerge -up file These are the packages that I would merge, in order: Calculating dependencies ...done! [ebuild U ] sys-libs/readline-5.0-r2 [4.3-r5] [ebuild U ] sys-devel/flex-2.5.4a-r6 [2.5.4a-r5] [ebuild U ] sys-devel/bc-1.06-r6 [1.06-r5] [ebuild U ] sys-apps/diffutils-2.8.7-r1 [2.8.7] [ebuild U ] sys-devel/libperl-5.8.6-r1 [5.8.5] [ebuild U ] dev-lang/perl-5.8.6-r5 [5.8.5-r5] [ebuild U ] dev-libs/openssl-0.9.7e-r1 [0.9.7e] [ebuild N ] app-admin/perl-cleaner-1.01 [ebuild U ] sys-libs/zlib-1.2.3 [1.2.2] [ebuild U ] dev-lang/python-2.3.5 [2.3.4-r1] [ebuild U ] sys-apps/file-4.13 [4.12] Expected Results: cloud distfiles # USE="-python" emerge -up file These are the packages that I would merge, in order: Calculating dependencies ...done! [ebuild U ] sys-apps/file-4.13 [4.12] Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-2.3.5-r1, 2.6.11-gentoo-r5 i686) ================================================================= System uname: 2.6.11-gentoo-r5 i686 AMD Athlon(tm) XP 1800+ Gentoo Base System version 1.4.16 dev-lang/python: 2.3.4-r1 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-r7 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.8.1-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="ftp://ftp.roedu.net/pub/mirrors/gentoo.org http://gentoo.oregonstate.edu" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync2.ro.gentoo.org/gentoo-portage" USE="x86 3dnow 3dnowext X aalib alsa apm avi bitmap-fonts cdr crypt cups curl eds emboss encode faac faad fam flac foomaticdb fortran gd geoip gif gphoto2 gpm gstreamer gtk2 guile imlib imlib2 jikes jpeg lcms libcaca libwww lzo mad matroska mikmod mmx mmx2 mmxext mng motif mp3 mpeg mysql ncurses network nls no_wxgtk1 ogg oggvorbis opengl pam png postgres python quicktime readline rtc ruby sdl slang spell sse ssl tcpd tga theora tiff truetype truetype-fonts type1-fonts vorbis xchatdccserver xml2 xmms xprint xv xvid zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS
You misunderstand how USE flags work. They're for controlling optional dependencies, and won't affect anything when a package always depends on another.
Perhaps to clarify, python is an unconditional dep elsewhere in the dep tree. Unless I'm not thinking properly.
Well, I think I know how USE flags are supposed to work. However, the only dependency of file is this one: DEPEND="!build? ( python? ( virtual/python ) )" So there is no other dependency tree. However, you are right. I thought this was a portage bug but its a bug in the file ebuild. It inherits distutils unconditionally and that makes it always depend on python, even when using -python.
Reopening in order to assign to bug-wranglers
Yeah, sorry if I was a bit trigger-happy on the 'assume the user is stupid' thing. It happens a bit too much these days. ;)
No problem ;) I too should have investigated things a little more before posting. Sorry for all the mess in reassigning the bug.
removed python from DEPEND
You seem to have misunderstood this bug report. Please read it again. The problem is that the file ebuild depends on python even when using "-python" in the use flags which should disable this dependency. The change you have commited doesn't "fix" the bug in any way... The "actual results" as mentioned in the first comment are still the same.
lemme rephrase we could: - remove all python support - add 'use python && inherit distutils' - ignore the issue since it doesnt seem to be a real important one i'm going with the last one
Why don't you use the second option you have mentioned. It's just a line and it would fix the problem. I don't think you should ignore the problem especially when the fix is so simple. The problem might not be important but it's really annoying (at least to me). Every time I want to "emerge -u something" that has file somewhere in the dependency tree (and a lot of packages do), I end up having to upgrade python and a slew of other packages as well. So let me end by saying this: Please fix this bug if the fix is so simple ;)
the 2nd one is wrong, it breaks portage caching mechanisms