View previous topic :: View next topic |
Author |
Message |
Xharlie n00b
Joined: 21 May 2017 Posts: 8
|
Posted: Thu Jun 13, 2024 11:46 am Post subject: -y or --noask switch for Portage & emaint commands? |
|
|
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 |
|
|
eeckwrk99 Apprentice
Joined: 14 Mar 2021 Posts: 187 Location: Gentoo forums
|
Posted: Thu Jun 13, 2024 11:58 am Post subject: Re: -y or --noask switch for Portage & emaint commands? |
|
|
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
, 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`? |
|
|
Back to top |
|
|
Xharlie n00b
Joined: 21 May 2017 Posts: 8
|
Posted: Thu Jun 13, 2024 12:01 pm Post subject: |
|
|
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 |
|
|
grknight Retired Dev
Joined: 20 Feb 2015 Posts: 1770
|
Posted: Thu Jun 13, 2024 12:19 pm Post subject: |
|
|
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 |
|
|
eeckwrk99 Apprentice
Joined: 14 Mar 2021 Posts: 187 Location: Gentoo forums
|
Posted: Thu Jun 13, 2024 12:20 pm Post subject: |
|
|
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 |
|
|
logrusx Veteran
Joined: 22 Feb 2018 Posts: 1832
|
Posted: Thu Jun 13, 2024 1:22 pm Post subject: |
|
|
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 |
|
|
|