commit: a9ef99b322412db9b93d3bc262297fc0a5b8c6ac Author: Zac Medico <zmedico <AT> gentoo <DOT> org> AuthorDate: Fri Jan 2 19:16:03 2026 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Mon Jan 5 03:37:13 2026 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=a9ef99b3
binarytree._populate_remote_repo: handle FileNotFoundError for file:// support Bug: https://bugs.gentoo.org/966721 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> lib/portage/dbapi/bintree.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/portage/dbapi/bintree.py b/lib/portage/dbapi/bintree.py index 7d13e500ea..e2478df673 100644 --- a/lib/portage/dbapi/bintree.py +++ b/lib/portage/dbapi/bintree.py @@ -1,4 +1,4 @@ -# Copyright 1998-2025 Gentoo Authors +# Copyright 1998-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 __all__ = ["bindbapi", "binarytree"] @@ -1562,8 +1562,11 @@ class binarytree: raise UseCachedCopyOfRemoteIndex("up-to-date", extra_info) if ( remote_pkgindex_file == "Packages.gz" - and isinstance(err, urllib.error.HTTPError) - and err.code == 404 + and isinstance(err, FileNotFoundError) + or ( + isinstance(err, urllib.error.HTTPError) + and err.code == 404 + ) ): # Ignore 404s for Packages.gz, as the file is # not guaranteed to exist.
