Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 42113 - environmental USE isnt overriding everything else
Summary: environmental USE isnt overriding everything else
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
: 42737 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-02-18 23:10 UTC by Jeff Stearns
Modified: 2004-08-16 10:57 UTC (History)
1 user (show)

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


Attachments
Temporary Fix (portage-2.0.50-r1-info.patch,826 bytes, patch)
2004-02-24 05:41 UTC, Jason Stubbs (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Stearns 2004-02-18 23:10:56 UTC
Several pieces of documentation state that USE-flags may be manipulated by setting the USE environment variable. This does not work as documented.

The USE environment variable works as documented to *add* USE-flags, but it does not work consistently to *remove* USE-flags.

To reproduce:
- Go to any gentoo 1.4 system with a generic configuration.
- Run "emerge info" and note that kde is included in the USE set printed.
- Now run this command:
        USE='-kde'  emerge info
- Note that kde is *still* included in the output list, although it was explicitly removed using the highest-priority mechanism.

Reproducible: Always
Steps to Reproduce:
1. Go to any gentoo 1.4 system with a generic configuration.

2. Run "emerge info" and note that kde is included in the USE set printed.

3. Now run this command:  USE='-kde'  emerge info
Actual Results:  
'kde' is  included in the output list from both commands

Expected Results:  
The 'kde' USE-flag should not be included in the output from step 3.

% USE='-kde' emerge info    <------ Note USE='-kde' setting!

Gentoo Base System version 1.4.3.13
Portage 2.0.50-r1 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.4.22-gentoo-r5)
============================================================
=====
System uname: 2.4.22-gentoo-r5 i686 Pentium III (Coppermine)
Autoconf: sys-devel/autoconf-2.58-r1
Automake: sys-devel/automake-1.7.7
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -mcpu=i686 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /
var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O3 -mcpu=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/
distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X apm arts avi berkdb crypt cups encode esd foomaticdb gdbm gif gnome gpm gtk gtk2 
imlib java jpeg kde libg++ libwww mad mikmod motif mpeg ncurses nls oggvorbis opengl oss pam 
pdflib perl png python qt quicktime readline sdl slang spell ssl svga tcpd truetype x86 xml2 xmms 
xv zlib"
Comment 1 Jason Stubbs (RETIRED) gentoo-dev 2004-02-24 05:41:08 UTC
Created attachment 26255 [details, diff]
Temporary Fix

This is more of a hack than a fix. The problem is that regenerate() is called
four times during
initialisation. One of those times, configdict["env"]["USE"] is replaced with
the processed USE flags.
Thus by the last time round, any -flag set is not honored. This hack gets
around this by copying
configdict["backupenv"]["USE"] to configdict["env"]["USE"] if it exists at the
start of each
regenerate().
Comment 2 Marius Mauch (RETIRED) gentoo-dev 2004-02-24 15:07:44 UTC
*** Bug 42737 has been marked as a duplicate of this bug. ***
Comment 3 Masatomo Nakano (RETIRED) gentoo-dev 2004-02-28 07:33:00 UTC
I think this is all we should fix.

portage.py Line 6270 in cvs.
-settings.regenerate() # XXX: Regenerate use after we get a vartree -- GLOBAL
+settings.reset() # XXX: Regenerate use after we get a vartree -- GLOBAL

maybe, we shouldn't call regenerate() function from out of config class..
Comment 4 Masatomo Nakano (RETIRED) gentoo-dev 2004-02-29 04:56:12 UTC
Fixed in CVS
Comment 5 Brian Harring (RETIRED) gentoo-dev 2004-08-16 10:57:21 UTC
Closing it out, can't duplicate it w/ .50-r9 or .51_pre17.