1 |
commit: e26ac28af7a6dc4cff2bf00737841d14dea669a5 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jul 1 08:11:12 2012 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jul 1 08:11:12 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=e26ac28a |
7 |
|
8 |
Fix bugs in binarytree.invalids usage. |
9 |
|
10 |
--- |
11 |
pym/portage/dbapi/bintree.py | 4 +++- |
12 |
pym/portage/dbapi/vartree.py | 2 +- |
13 |
2 files changed, 4 insertions(+), 2 deletions(-) |
14 |
|
15 |
diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py |
16 |
index fb31572..1048cc1 100644 |
17 |
--- a/pym/portage/dbapi/bintree.py |
18 |
+++ b/pym/portage/dbapi/bintree.py |
19 |
@@ -1312,6 +1312,8 @@ class binarytree(object): |
20 |
"""Returns the URI to the Packages file for a given package.""" |
21 |
return self._pkgindex_uri.get(pkgname) |
22 |
|
23 |
+ |
24 |
+ |
25 |
def gettbz2(self, pkgname): |
26 |
"""Fetches the package from a remote site, if necessary. Attempts to |
27 |
resume if the file appears to be partially downloaded.""" |
28 |
@@ -1319,7 +1321,7 @@ class binarytree(object): |
29 |
tbz2name = os.path.basename(tbz2_path) |
30 |
resume = False |
31 |
if os.path.exists(tbz2_path): |
32 |
- if (tbz2name not in self.invalids): |
33 |
+ if tbz2name[:-5] not in self.invalids: |
34 |
return |
35 |
else: |
36 |
resume = True |
37 |
|
38 |
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py |
39 |
index 0d7327a..e5e1195 100644 |
40 |
--- a/pym/portage/dbapi/vartree.py |
41 |
+++ b/pym/portage/dbapi/vartree.py |
42 |
@@ -4727,7 +4727,7 @@ class dblink(object): |
43 |
bintree = trees["bintree"] |
44 |
binpkg_path = bintree.getname(backup_dblink.mycpv) |
45 |
if os.path.exists(binpkg_path) and \ |
46 |
- backup_dblink.mycpv not in bintree.invalids: |
47 |
+ catsplit(backup_dblink.mycpv)[1] not in bintree.invalids: |
48 |
return os.EX_OK |
49 |
|
50 |
self.lockdb() |