1 |
Since commit 328dd4712f88cbb8ef390ae9eb471afa1ef781d7, |
2 |
get_pkgindex_uri triggers AttributeError if --rebuild* options are |
3 |
used together with --getbinpkg=n. |
4 |
|
5 |
Fixes: 328dd4712f88 ("binpkg-multi-instance 3 of 7") |
6 |
X-Gentoo-Bug: 549666 |
7 |
X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=549666 |
8 |
--- |
9 |
pym/portage/dbapi/bintree.py | 7 ++++--- |
10 |
1 file changed, 4 insertions(+), 3 deletions(-) |
11 |
|
12 |
diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py |
13 |
index 4043016..f415a63 100644 |
14 |
--- a/pym/portage/dbapi/bintree.py |
15 |
+++ b/pym/portage/dbapi/bintree.py |
16 |
@@ -1441,9 +1441,10 @@ class binarytree(object): |
17 |
def get_pkgindex_uri(self, cpv): |
18 |
"""Returns the URI to the Packages file for a given package.""" |
19 |
uri = None |
20 |
- metadata = self._remotepkgs.get(self.dbapi._instance_key(cpv)) |
21 |
- if metadata is not None: |
22 |
- uri = metadata["PKGINDEX_URI"] |
23 |
+ if self._remotepkgs is not None: |
24 |
+ metadata = self._remotepkgs.get(self.dbapi._instance_key(cpv)) |
25 |
+ if metadata is not None: |
26 |
+ uri = metadata["PKGINDEX_URI"] |
27 |
return uri |
28 |
|
29 |
def gettbz2(self, pkgname): |
30 |
-- |
31 |
2.3.5 |