LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Very basic clarification regarding USE flags for emerge (https://www.linuxquestions.org/questions/linux-newbie-8/very-basic-clarification-regarding-use-flags-for-emerge-778174/)

gregorian 12-26-2009 08:32 AM

Very basic clarification regarding USE flags for emerge
 
I'm trying to install python with the sqlite use flag. I entered python/ sqlite in the /etc/portage/package.use and then entered emerge -pv python. This is what I got:

Code:

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  R  ] dev-lang/python-2.6.4  USE="berkdb gdbm ipv6 ncurses readline ssl threads (wide-unicode) xml -build -doc -examples -sqlite -tk -wininst" 10,760 kB

Total: 1 package (1 reinstall), Size of downloads: 10,760 kB

Why is -sqlite set?

Why does
Code:

#USE=sqlite emerge -pv python
show what I want while
Code:

#USE=sqlite
#emerge -pv python

doesn't work?

~sHyLoCk~ 12-26-2009 09:05 AM

You need to enable the use flag in package.use, by default it's disabled.

verdeboy2k 12-26-2009 09:28 AM

also, (assuming bash)
Code:

export USE="sqlite"
emerge python

would exhibit the desired behavior.

dxqcanada 12-26-2009 09:31 AM

Code:

dev-lang/python sqlite
in your /etc/portage/package.use should work.
Code:

6510b ~ # echo "dev-lang/python sqlite" >> /etc/portage/package.use
6510b ~ # emerge -av python

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  R  ] dev-lang/python-2.6.4  USE="berkdb gdbm ipv6 ncurses readline sqlite* ssl threads (wide-unicode) xml -build -doc -examples -tk -wininst" 0 kB


gregorian 12-26-2009 11:08 AM

I made the mistake of omitting dev-lang in dev-lan/python.
Quote:

export USE="sqlite"
emerge python
Your suggestion worked. What's the difference between USE="sqlite" and export USE="sqlite" as long as I execute the former in the shell directly?

Thank you both!

verdeboy2k 12-30-2009 07:41 AM

Basically, each command line is its own individual shell script. If you don't export the variable, it isn't added to your environment for that bash session.


All times are GMT -5. The time now is 01:48 PM.