View previous topic :: View next topic |
Author |
Message |
zomnut n00b
Joined: 25 Aug 2012 Posts: 10
|
Posted: Tue Oct 08, 2024 6:51 pm Post subject: emerge --sync --ask only asks for one repository |
|
|
When I add --ask to emerge --sync, it only asks for verification on the first repository (the default gentoo one) and then proceeds to sync additional repositories regardless of my answer to that first prompt, even if that answer was no.
Code: | $ sudo emerge --sync --ask
Password:
>>> 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://81.91.253.252/gentoo-portage? [Yes/No] no
Quitting.
>>> Syncing repository 'steam-overlay' into '/var/db/repos/steam-overlay'...
/usr/sbin/git fetch origin --depth 1
remote: Enumerating objects: 35, done.
remote: Counting objects: 100% (35/35), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 18 (delta 10), reused 18 (delta 10), pack-reused 0 (from 0)
Unpacking objects: 100% (18/18), 2.64 KiB | 450.00 KiB/s, done.
From https://github.com/gentoo-mirror/steam-overlay
+ e14708f...1dc5a0d master -> origin/master (forced update)
/usr/sbin/git reset --merge refs/remotes/origin/master
=== Sync completed for steam-overlay
Action: sync for repo: gentoo, returned code = 130
Action: sync for repo: steam-overlay, returned code = 0 |
I would expect a confirmation for each repository sync, or at a minimum I would expect it to use the response given for each repository. Where is my understanding falling short? |
|
Back to top |
|
|
powerN00b n00b
Joined: 11 Jul 2024 Posts: 5
|
Posted: Wed Oct 09, 2024 9:19 am Post subject: |
|
|
Code: | --sync Updates repositories, for which auto-sync, sync-type and sync-uri attributes are set in repos.conf. A list of repos or aliases can be specified, in which case they will be updated regardless of their auto-sync attribute. |
/etc/portage/repos.conf |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20441
|
Posted: Wed Oct 09, 2024 6:08 pm Post subject: |
|
|
Seems like a bug to me.
And an old one at that:
https://bugs.gentoo.org/565386
Despite the title, 'sync-type' doesn't seem to be a limiting factor. The first few comments seem to be a conceptual solution that would work in the general case. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
zomnut n00b
Joined: 25 Aug 2012 Posts: 10
|
Posted: Wed Oct 09, 2024 8:03 pm Post subject: |
|
|
2015, nice. Ultimately not a deal breaker for me. It only came up because I threw --ask into my EMERGE_DEFAULT_OPTS and the odd behaviour showed up immediately. |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20441
|
Posted: Wed Oct 09, 2024 10:16 pm Post subject: |
|
|
As a workaround, it seems like you could change auto-sync to no and then use "&&" to sync subsequent repos.
For example, this seems to work: Code: | emerge --sync --ask || echo "Don't sync other repos" | When I answer 'n', I get the expected message. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3361
|
Posted: Wed Oct 09, 2024 10:45 pm Post subject: |
|
|
TBH doing it in multiple passes sounds really excessive for a --sync.
Why even ask for confirmation at all when pulling repos? You're not getting any new information from that, why would you change your mind half-way through?
I kinda wonder how is your emerge different to mine though. I have -a in default opts too, yet I don't recall it ever asking me for confirmations before sync (I'm not complaining) _________________ Make Computing Fun Again |
|
Back to top |
|
|
|