Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
What's different between '-' use flag and not having at all
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
whjeon
Tux's lil' helper
Tux's lil' helper


Joined: 20 Nov 2017
Posts: 82
Location: Seoul,Korea(Republic of)

PostPosted: Sat Dec 02, 2017 11:40 am    Post subject: What's different between '-' use flag and not having at all Reply with quote

Let's say some package has 'A' use flag.
If I don't have any use flag on make.conf or package.use, then A won't be compiled right?
then where is difference with '-A' flag in make.conf? 8O
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat Dec 02, 2017 12:42 pm    Post subject: Reply with quote

whjeon,

Short answer ... maybe

Longer answer. USE flag settings are hierarchical, with lower level settings overriding higher level settings.

An the top level are the USE flags in your profile. These are set if there is no USE in make.conf.
USE in make.conf adds to or rake away from the profile USE settings, so USE=+foo sets a flag, USE=-foo unsets it.
The + is not required.

That's all the global settings.
The same is true in package.use and even on the command line.

You use USE=-foo to unset a USE flag that is inherited from further up the hierarchy.

Its not an error to set/unset a USE flag multiple times. Only the last setting takes effect.
_________________
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
whjeon
Tux's lil' helper
Tux's lil' helper


Joined: 20 Nov 2017
Posts: 82
Location: Seoul,Korea(Republic of)

PostPosted: Sat Dec 02, 2017 2:31 pm    Post subject: Reply with quote

NeddySeagoon wrote:
USE flag settings are hierarchical, with lower level settings overriding higher level settings.

Thanks for your kind reply! :D
But my question is not solved yet.
I understand what you said and I mean other thing.

Let's assume there is no 'profile list' flag, local 'package.use' or anything but only 'make.conf' is exist.

If a package named 'foo' has availabe use flags as 'A B C'
(1) I made 'USE=" "(nothing).
then any of them will compiled.

(2)But when I make my use flag as 'USE= -A -B -C'.
Those will also not compile any of them.

So where is the difference then. I think only 'A' thing (like positive/not negative flag) has real meaning.

Or that difference exist for various situation? for combination with package.use?
Something like "I want 'foo' with 'A' but 'bar' without 'A'"? 8O
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat Dec 02, 2017 2:34 pm    Post subject: Reply with quote

whjeon,

There is no difference between USE=foo not being set anywhere in the hierarchy to setting USE="-foo" somewhere.
All USE flags are off until they are turned on somewhere.
_________________
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
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Sat Dec 02, 2017 5:01 pm    Post subject: Reply with quote

whjeon,
Some packages have use flags that are automatically turned on unless they are turned off. These are indicated by (using your example) +A in the IUSE line in the ebuild. That flag will be used even if it is not set in the profile or make.conf. You have to positively put -A somewhere (I prefer package.use) to turn it off. If IUSE does not have a + sign in front it will not be turned on unless set by the profile , make.conf, or package.use.
Back to top
View user's profile Send private message
whjeon
Tux's lil' helper
Tux's lil' helper


Joined: 20 Nov 2017
Posts: 82
Location: Seoul,Korea(Republic of)

PostPosted: Sun Dec 03, 2017 2:57 pm    Post subject: Reply with quote

Tony0945 wrote:
These are indicated by (using your example) +A in the IUSE line in the ebuild. That flag will be used even if it is not set in the profile or make.conf. You have to positively put -A somewhere (I prefer package.use) to turn it off. If IUSE does not have a + sign in front it will not be turned on unless set by the profile , make.conf, or package.use.

Thanks! I didn't know that and that was exactly what I'm looking for! :D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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