Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
command line EMERGE_DEFAULT_OPTS partial cancelling? [work@]
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
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3811

PostPosted: Fri Oct 11, 2024 8:09 pm    Post subject: command line EMERGE_DEFAULT_OPTS partial cancelling? [work@] Reply with quote

EMERGE_DEFAULT_OPTS="... --tree ..." in /etc/portage/make.conf here.

wiki

I feel quite dumb asking :oops::
How to suspend the feature from command line when calling emerge?

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "


Last edited by CaptainBlood on Sat Oct 12, 2024 12:09 am; edited 5 times in total
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1869

PostPosted: Fri Oct 11, 2024 8:37 pm    Post subject: Reply with quote

Example.. emerge --tree=n Every emerge option, because it is parsed by python, can have --option=value to set or enable/disable anything.
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3811

PostPosted: Fri Oct 11, 2024 8:46 pm    Post subject: Reply with quote

Nice, Couldn't get it from
Code:
man emerge

Thks 4 ur attention, interest & support
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3811

PostPosted: Fri Oct 11, 2024 9:48 pm    Post subject: Reply with quote

Oops here:
Code:
emerge --tree=n 2>&1|tail -1
emerge: error: argument --tree: ignored explicit argument 'n'

Am I missing something?

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1869

PostPosted: Fri Oct 11, 2024 10:17 pm    Post subject: Reply with quote

Looks like this is one exception to the rule. Most of the options can do this, but not tree for some reason. Certain options make sense not to be able to be reversible for the mode (like --sync).

Maybe this could be a feature request where it makes sense.
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3811

PostPosted: Fri Oct 11, 2024 10:29 pm    Post subject: Reply with quote

Current one liner of a workaround:
Code:
eval $(emerge --info|sed -E -n "s/^(.*)(--tree)(.*)$/\1\3/p") emerge --info|grep EMERGE_DEFAULT_OPTS

I couldn't get it work without the eval :cry:
Almost first use case here :?
Any idea how to avoid it? :roll:

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3811

PostPosted: Fri Oct 11, 2024 10:52 pm    Post subject: Reply with quote

grknight wrote:
Looks like this is one exception to the rule. Most of the options can do this, but not tree for some reason. Certain options make sense not to be able to be reversible for the mode (like --sync).

Maybe this could be a feature request where it makes sense.
Sound too much of a lost cause, rather. :?

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3365

PostPosted: Fri Oct 11, 2024 11:31 pm    Post subject: Reply with quote

I see you came up with a very creative way to override config with env.
At this point, wouldn't it be easier to make default opts environmental variable an empty string and just provide the switches you want manually instead of running emerge twice and mangling the output with an almost unreadable regexp?

I wonder, why do you NEED to unset --tree? I know it changes output format, but I don't think it's supposed to change the result of requested operation in any way. Do I miss something?
_________________
Make Computing Fun Again
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3811

PostPosted: Fri Oct 11, 2024 11:45 pm    Post subject: Reply with quote

szatox wrote:
I see you came up with a very creative way to override config with env.
Possibly :?: slightly better,
Code:
eval $(emerge --info|sed -E -n "s/^(EMERGE_DEFAULT_OPTS=\".*)(--tree)(.*)$/\1\3/p") emerge --info|grep EMERGE_DEFAULT_OPTS
eval remains though :twisted:

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22495

PostPosted: Sat Oct 12, 2024 12:19 am    Post subject: Reply with quote

You can use --ignore-default-opts to disable all the defaults. However, if you have some defaults that you want and some you do not (which is how I interpret the original question), then this disables too much.
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