Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 1455 - USE broken: -item in USE enviroment variable does not work
Summary: USE broken: -item in USE enviroment variable does not work
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Daniel Robbins (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-01 16:06 UTC by Jared H. Hudson
Modified: 2011-10-30 22:21 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 Jared H. Hudson 2002-04-01 16:06:22 UTC
If you have a use item like ssl in your /etc/make.globals file and you disable 
it by running export USE="-ssl" then ebuilding/emerging a package; if the 
package contains a statement like if [ "`use ssl`" ]; then it will incorrectly 
think that ssl is included in your USE list, regardless of the USE enviroment 
variable.

To show this problem, create a ebuild named test-1.0.ebuild with the following 
lines in it:
----------------------
TEST1="`use ssl`";
echo $TEST1;

TEST2="`echo $USE`";
echo $TEST2;
-----------------------
Then make sure you have ssl in your /etc/make.global, but not defined or 
removed from your /etc/make.conf and you run
export USE="-ssl"
ebuild test-1.0.ebuild clean

It SHOULD print nothing on the first line, and a list of use items on the 2nd, 
with the ssl item missing.
What it WILL print is ssl on the first line, and a list of use items on the 2nd,
with the ssl item missing.

This appears to only affect enviroments variables and -/removing use items.
For example if I run the same ebuild but with the word foo substituted for ssl;
And since foo is not in /etc/make.* and I export USE="foo" It DOES show up on 
both lines, as it should.

Also, it appears that -item in itself is not broken, because I can add -ssl to 
my USE list in /etc/make.conf (with no enviroment variable) and it works 
properly. So, it only seems to apply to -item in a USE enviroment variable.
Comment 1 Seemant Kulleen (RETIRED) gentoo-dev 2002-04-01 16:22:54 UTC
First: this is what my ebuild looks like:

nebuchadnezzar blah # cat blah-0.1.ebuild 
#blah, test ebuild for USE="-foo" testing

TEST1="`use ssl`";
echo "built-in: ${TEST1}";

TEST2="`echo $USE`";
echo "environment: ${TEST2}";


My /etc/make.conf is thus:

nebuchadnezzar blah # grep USE /etc/make.conf
USE="-nls -arts -kde -gnome -bonobo -qt -sse -cups mmx 3dnow"

nebuchadnezzar blah # grep USE /etc/make.globals
USE_ORDER="env:conf:auto:defaults"
USE="slang readline gpm berkdb gdbm tcpd pam libwww ssl


Now, watch:

nebuchadnezzar blah # ebuild blah-0.1.ebuild unpack
built-in: ssl
environment: xv slang readline gpm berkdb gdbm tcpd pam libwww ssl mitshm perl
python esd gif imlib sdl oggvorbis gtk X motif opengl mozilla directfb gtkhtml
alsa tex aalib svga ggi tcltk java guile ruby postgres mmx 3dnow
>>> WORKDIR is up-to-date, keeping...

And, watch again:

nebuchadnezzar blah # USE="-ssl" ebuild blah-0.1.ebuild unpack
built-in: ssl
environment: xv slang readline gpm berkdb gdbm tcpd pam libwww mitshm perl
python esd gif imlib sdl oggvorbis gtk X motif opengl mozilla directfb gtkhtml
alsa tex aalib svga ggi tcltk java guile ruby postgres mmx 3dnow
>>> WORKDIR is up-to-date, keeping...


So, what's the story morning glory?
Comment 2 Seemant Kulleen (RETIRED) gentoo-dev 2002-04-02 04:35:35 UTC
portage-1.8.10 seems to be working fine with this
Comment 3 Jared H. Hudson 2002-04-03 02:39:20 UTC
It still is a problem, double check your methods. Grant confirmed it's still a
problem on his system as well. In addition Daniel said he's still hasn't added
the  fix yet.
Comment 4 Seemant Kulleen (RETIRED) gentoo-dev 2002-04-03 03:28:12 UTC
It is behaving inconsistently.  I'll show some output.
Comment 5 Seemant Kulleen (RETIRED) gentoo-dev 2002-04-14 00:44:35 UTC
Currently, export USE="-blah" emerge foo

works.  However, it would be nice to do it without the export bit.  I am handing
this bug to Daniel.
Comment 6 Daniel Robbins (RETIRED) gentoo-dev 2002-04-16 00:38:15 UTC
should be fixed on our dev cvs and in (forthcoming) 1.8.20