Skip to content

Commit 63287ed

Browse files
committed
bintree: fix UnboundLocalError for url when using cached index
Bug: https://bugs.gentoo.org/965453 Signed-off-by: Zac Medico <[email protected]>
1 parent 11e0eea commit 63287ed

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/portage/dbapi/bintree.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1377,6 +1377,7 @@ def _populate_remote(self, getbinpkg_refresh=True, pretend=False, verbose=False)
13771377
for repo in reversed(list(self._binrepos_conf.values())):
13781378
binrepo_name = repo.name or repo.name_fallback
13791379
base_url = repo.sync_uri
1380+
pkgindex_uri = base_url.rstrip("/") + "/Packages"
13801381
parsed_url = urlparse(base_url)
13811382
host = parsed_url.hostname or ""
13821383
port = parsed_url.port
@@ -1755,7 +1756,7 @@ def _populate_remote(self, getbinpkg_refresh=True, pretend=False, verbose=False)
17551756

17561757
d["CPV"] = cpv
17571758
d["BASE_URI"] = remote_base_uri
1758-
d["PKGINDEX_URI"] = url
1759+
d["PKGINDEX_URI"] = pkgindex_uri
17591760
# FETCHCOMMAND and RESUMECOMMAND may be specified
17601761
# by binrepos.conf, and otherwise ensure that they
17611762
# do not propagate from the Packages index since

0 commit comments

Comments
 (0)