commit:     26fd7ffdd5b74af3aeedf0e6a87ac6b3d1243848
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 24 19:28:40 2019 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Oct 24 19:29:26 2019 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=26fd7ffd

fetch: respect try_mirrors parameter for local mirrors

This is needed in order to prevent infinit recursion like this:

  File "portage/package/ebuild/fetch.py", line 1131, in fetch
    loc = loc()
  File "portage/package/ebuild/fetch.py", line 424, in get_mirror_url
    mysettings, force=1, try_mirrors=0):
  File "portage/package/ebuild/fetch.py", line 1131, in fetch
    loc = loc()

Bug: https://bugs.gentoo.org/698474
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 lib/portage/package/ebuild/fetch.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/portage/package/ebuild/fetch.py 
b/lib/portage/package/ebuild/fetch.py
index cf073436e..58718b568 100644
--- a/lib/portage/package/ebuild/fetch.py
+++ b/lib/portage/package/ebuild/fetch.py
@@ -588,7 +588,7 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0,
 #                      use_locks = 0
 
        # local mirrors are always added
-       if "local" in custommirrors:
+       if try_mirrors and "local" in custommirrors:
                mymirrors += custommirrors["local"]
 
        if restrict_mirror:

Reply via email to