commit:     a805000fc9ed82dedfab1858312222f70de28182
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Fri Jul  4 15:27:56 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jul 13 04:19:01 2025 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=a805000f

emerge-webrsync: don't tolerate an empty definition of GENTOO_MIRRORS

Presently, the do_snapshot() function considers the value of the
'GENTOO_MIRRORS' portage variable, separating its words into the
'mirrors' array variable. However, it will tolerate a value that is
either empty or blank, in which case it will warn that the snapshot
could not be found.

 * 20250704 snapshot was not found

Instead, have it report that the 'GENTOO_MIRRORS' variable is empty
before proceeding to die.

 * GENTOO_MIRRORS has been set as an empty or blank string
emerge-webrsync: couldn't parse GENTOO_MIRRORS

See-also: 432c18cc91037ba1a3a253fee00e66b820a1df33
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 bin/emerge-webrsync | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index 22e1699db4..096c25e874 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -519,6 +519,9 @@ do_snapshot() {
 
        if (( have_files )); then
                sync_local "${DISTDIR}/${file}"
+       elif (( ! ${#mirrors[@]} )); then
+               eerror "GENTOO_MIRRORS has been set as an empty or blank string"
+               die "couldn't parse GENTOO_MIRRORS"
        else
                ewarn "${date} snapshot was not found"
                false

Reply via email to