commit: 25c31a95fd1421952f78ed36dab69d8ff8f1a877 Author: Zac Medico <zmedico <AT> gentoo <DOT> org> AuthorDate: Sat May 16 19:03:45 2015 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Sat May 16 19:13:23 2015 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=25c31a95
binarytree.get_pkgindex_uri: handle --gebinpkg=n (bug 549666) Since commit 328dd4712f88cbb8ef390ae9eb471afa1ef781d7, get_pkgindex_uri triggers AttributeError if --rebuild* options are used together with --getbinpkg=n. Fixes: 328dd4712f88 ("binpkg-multi-instance 3 of 7") X-Gentoo-Bug: 549666 X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=549666 Acked-by: Brian Dolbec <dolsen <AT> gentoo.org> pym/portage/dbapi/bintree.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py index 4043016..f415a63 100644 --- a/pym/portage/dbapi/bintree.py +++ b/pym/portage/dbapi/bintree.py @@ -1441,9 +1441,10 @@ class binarytree(object): def get_pkgindex_uri(self, cpv): """Returns the URI to the Packages file for a given package.""" uri = None - metadata = self._remotepkgs.get(self.dbapi._instance_key(cpv)) - if metadata is not None: - uri = metadata["PKGINDEX_URI"] + if self._remotepkgs is not None: + metadata = self._remotepkgs.get(self.dbapi._instance_key(cpv)) + if metadata is not None: + uri = metadata["PKGINDEX_URI"] return uri def gettbz2(self, pkgname):