Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Choosing the right USE flags
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
rpil
Guru
Guru


Joined: 23 May 2008
Posts: 314

PostPosted: Sun Nov 22, 2009 10:21 am    Post subject: Choosing the right USE flags Reply with quote

I wish to install Opera browser, so I gave a
Code:
emerge --pretend opera

I received
Code:
[ebuild  N    ] www-client/opera-10.01  USE="gnome qt3 (-ia32) -qt-static" LINGUAS="-be -bg -cs -da -de -el -en_GB -es_ES -es_LA -et -fi -fr -fr_CA -fy -hi -hr -hu -id -it -ja -ka -ko -lt -mk -nb -nl -nn -pl -pt -pt_BR -ro -ru -sk -sr -sv -ta -te -tr -uk -zh_CN -zh_HK -zh_TW"

I don't want to install all those languages. Which command shall I use to exclude the languages (or generally the flags) that I don't need?


Last edited by rpil on Sun Nov 22, 2009 11:01 am; edited 1 time in total
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Sun Nov 22, 2009 10:23 am    Post subject: Reply with quote

The prefix - on each of the items in that list indicates that they are already excluded, even so, you can explicitly include and exclude them by suitably setting LINGUAS in /etc/make.conf.
Back to top
View user's profile Send private message
rpil
Guru
Guru


Joined: 23 May 2008
Posts: 314

PostPosted: Sun Nov 22, 2009 10:26 am    Post subject: Reply with quote

Thanks, desultory, but if I want to exclude a flag (generally speaking), who can I do this?
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Sun Nov 22, 2009 10:30 am    Post subject: Reply with quote

For language flags, -${language} in LINGUAS in /etc/make.conf, for USE flags in general, -${flag} in USE in /etc/make.conf, where ${language} and ${flag} are respectively replaced by the undesirable language and USE flag.
Back to top
View user's profile Send private message
rpil
Guru
Guru


Joined: 23 May 2008
Posts: 314

PostPosted: Sun Nov 22, 2009 10:43 am    Post subject: Reply with quote

No, I mean when I want to download a package and I don' t need some flags, how can I exclude them from emerging?
For example,
Code:
emerge openoffice

If I don't want to download all that stuff that follows the package, by which command can I exclude it?
emerge "what"? :wink:
Thanks.
Back to top
View user's profile Send private message
aguettinger
Tux's lil' helper
Tux's lil' helper


Joined: 26 Sep 2003
Posts: 84

PostPosted: Sun Nov 22, 2009 11:30 am    Post subject: Reply with quote

The flags are like switches, options that the package provides.

aflag behind the emerge package means the flag is on.
-aflag means the flag is off.

Looking at you opera line, the current flags that are set in you example are gnome and qt3. All the other flags and the LINGUAS are not set, thus the - in front of them. This means opera will be only built for the default language (english). That's probably what you wanted?

If you want additional language support, you can set them in the LINGUAS line in your /etc/make.conf.
This is globally and affects the whole system.
e.g.

LINGUAS="en de" will add support for english and german to the packages that support it.

For the other flags that don't deal with language support there are 2 possibilities:
1. You can add them either globally in your system effecting all the packages you build by adding them to the USE= line in your /etc/make.conf. You can do that by hand or using ufed (emerge ufed), which provides a simple GUI to do it.

2. or you can change the flags only for a specific package by adding a line to the /etc/portage/package.use file. The first time you might have to create a directory /etc/portage if it doesn't exist.

e.g. if you wanted to build opera without qt3 support:

nano -w /etc/portage/packages.use

add the line:

www-client/opera -qt3

Ctrl-O and exit.

or if you wanted openoffice with the nsplugin use flag set (by the fault it would be off) you would add the line

app-office/openoffice nsplugin

to the file /etc/portage/packages.use.
_________________
regards
- andy
Back to top
View user's profile Send private message
rpil
Guru
Guru


Joined: 23 May 2008
Posts: 314

PostPosted: Sun Nov 22, 2009 9:05 pm    Post subject: Reply with quote

Thank you very much! So, the only way to choose flags before emerging, is to go and add them to the relevant files.
No "emerge -something" option, from the terminal. OK. :wink:
Back to top
View user's profile Send private message
RedSquirrel
Guru
Guru


Joined: 22 Apr 2008
Posts: 336

PostPosted: Sun Nov 22, 2009 9:25 pm    Post subject: Reply with quote

rpil wrote:
Thank you very much! So, the only way to choose flags before emerging, is to go and add them to the relevant files.
No "emerge -something" option, from the terminal. OK. :wink:

See the heading Declare temporary USE flags in the Handbook. There are very few cases where you would want to do it that way. Most of the time, you want the USE settings to be saved so that the settings will be applied when you rebuild or update. In some unusual circumstances, declaring USE flags on the command line might be used for a workaround or perhaps for testing (i.e., with --pretend).
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54236
Location: 56N 3W

PostPosted: Sun Nov 22, 2009 9:27 pm    Post subject: Reply with quote

rpil,

You can put
Code:
USE="someflag" emerge <package>
in the terminal but that way lies madness and maybe a broken install.
When you give USE flags on the command line like that, portage will not remember them so at your next
Code:
emerge -uDNav world
the comman line settings will drop out. This is usually not what you want.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
rpil
Guru
Guru


Joined: 23 May 2008
Posts: 314

PostPosted: Sun Nov 22, 2009 9:54 pm    Post subject: Reply with quote

Thank you all, my friends! I appreciate. :D
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Sun Nov 22, 2009 11:51 pm    Post subject: Reply with quote

Remember that you can test a lot of stuff, but once you choose what use flags that you want, you can either choose to put them inside your make.conf or use the file /etc/portage/package.use too :P
Back to top
View user's profile Send private message
emilycarvar
n00b
n00b


Joined: 16 Apr 2010
Posts: 2

PostPosted: Fri Apr 16, 2010 11:37 am    Post subject: Reply with quote

As per the topic can say that choosing the right USE flags, although very important, is also quite simple. USE flag is a representation of an option, a global setting for your final system it affect how many of the packages on your system will build.The description of each use flag should help you decide which to choose. If you are not sure leave it out; there are some default USE flags set for you already.
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Fri Apr 16, 2010 11:43 am    Post subject: Reply with quote

A lot of new users use the Desktop profile, because with that profile, you will be able to install almost any WM without major problem with use flags.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum