Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
-y or --noask switch for Portage & emaint commands?
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
Xharlie
n00b
n00b


Joined: 21 May 2017
Posts: 8

PostPosted: Thu Jun 13, 2024 11:46 am    Post subject: -y or --noask switch for Portage & emaint commands? Reply with quote

In my `/etc/portage/make.conf`, I have set `EMERGE_DEFAULT_OPTS="--ask --ask-enter-invalid …"` because, honestly, these saved my arse so many times that it's bonkers.

The full set is:

Code:

EMERGE_DEFAULT_OPTS="--ask --ask-enter-invalid --fail-clean --quiet-build"


However, because `--ask` is there, I also get an interactive halt when I run things like `emaint sync` and that's really not what I want.

I don't think I have ever bothered to type `sudo emaint sync` into a terminal and *not* actually intended to actually sync.

Similarly, there are a few times when I do want to just `emerge` or `emerge --depclean` without being asked, despite having the defaults.

Is there some way to send `--noask` or `-y` or something to these commands to override the pre-existing `--ask` from `EMERGE_DEFAULT_OPTS`?

I have tried a few things but I can't seem to find how to do it.

Shell aliases are also of limited use because they don't get applied when `sudo` enters the picture.
Back to top
View user's profile Send private message
eeckwrk99
Apprentice
Apprentice


Joined: 14 Mar 2021
Posts: 180
Location: Gentoo forums

PostPosted: Thu Jun 13, 2024 11:58 am    Post subject: Re: -y or --noask switch for Portage & emaint commands? Reply with quote

Xharlie wrote:
However, because `--ask` is there, I also get an interactive halt when I run things like `emaint sync` and that's really not what I want. I don't think I have ever bothered to type `sudo emaint sync` into a terminal and *not* actually intended to actually sync.

I'm also using --ask in EMERGE_DEFAULT_OPTS and I'm not getting any interactive confirmation when running
Code:
# emaint sync -a
, be it with sudo or as root.
Xharlie wrote:
Is there some way to send `--noask` or `-y` or something to these commands to override the pre-existing `--ask` from `EMERGE_DEFAULT_OPTS`?

Code:
--ask n
Back to top
View user's profile Send private message
Xharlie
n00b
n00b


Joined: 21 May 2017
Posts: 8

PostPosted: Thu Jun 13, 2024 12:01 pm    Post subject: Reply with quote

This is what `sudo emaint sync` gives me, every time:

Code:

>>> Syncing repository 'gentoo' into '/var/db/repos/gentoo'...
 * Using keys from /usr/share/openpgp-keys/gentoo-release.asc
 * Refreshing keys via WKD ...                                                               [ ok ]
Do you want to sync your ebuild repository with the mirror at
rsync://[2a00:1828:a00d:ffff::6]/gentoo-portage? [Yes/No]


I had just guessed that it began to do so when I added `--ask` to `EMERGE_DEFAULT_OPTS` because it was not always thus.
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1743

PostPosted: Thu Jun 13, 2024 12:19 pm    Post subject: Reply with quote

Xharlie wrote:
Is there some way to send `--noask` or `-y` or something to these commands to override the pre-existing `--ask` from `EMERGE_DEFAULT_OPTS`?

Being python based, many boolean options can be negated like --ask=n. This is covered in the man page as well.
Back to top
View user's profile Send private message
eeckwrk99
Apprentice
Apprentice


Joined: 14 Mar 2021
Posts: 180
Location: Gentoo forums

PostPosted: Thu Jun 13, 2024 12:20 pm    Post subject: Reply with quote

Xharlie wrote:
This is what `sudo emaint sync` gives me, every time:

Code:

>>> Syncing repository 'gentoo' into '/var/db/repos/gentoo'...
 * Using keys from /usr/share/openpgp-keys/gentoo-release.asc
 * Refreshing keys via WKD ...                                                               [ ok ]
Do you want to sync your ebuild repository with the mirror at
rsync://[2a00:1828:a00d:ffff::6]/gentoo-portage? [Yes/No]


I had just guessed that it began to do so when I added `--ask` to `EMERGE_DEFAULT_OPTS` because it was not always thus.


Ha, maybe that's because you're using rsync and I'm using Git (Gentoo Wiki - Portage with Git).
Back to top
View user's profile Send private message
logrusx
Veteran
Veteran


Joined: 22 Feb 2018
Posts: 1757

PostPosted: Thu Jun 13, 2024 1:22 pm    Post subject: Reply with quote

Xharlie wrote:
This is what `sudo emaint sync` gives me, every time:
Code:

rsync://[2a00:1828:a00d:ffff::6]/gentoo-portage? [Yes/No]



Looks like rsync related to me.

Best Regards,
Georgi
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