summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-12-12 21:48:56 +0000
committerZac Medico <zmedico@gentoo.org>2008-12-12 21:48:56 +0000
commit50b75d000c6d2d8f3cb96fd581ca885bac6fc366 (patch)
tree2c81f5049c5bd28ebec615a12777427c1cb5fb5f
parentb5930985225c70ef5a5fcde5cd988732ad306f32 (diff)
downloadportage-50b75d000c6d2d8f3cb96fd581ca885bac6fc366.tar.gz
portage-50b75d000c6d2d8f3cb96fd581ca885bac6fc366.tar.bz2
portage-50b75d000c6d2d8f3cb96fd581ca885bac6fc366.zip
Fix old-style binhost code binarytree.digestCheck() will use local digests when
a local package overrides a remote one. (trunk r12208) svn path=/main/branches/2.1.6/; revision=12239
-rw-r--r--pym/portage/dbapi/bintree.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
index 0fa2db06a..7c6cd5980 100644
--- a/pym/portage/dbapi/bintree.py
+++ b/pym/portage/dbapi/bintree.py
@@ -740,6 +740,11 @@ class binarytree(object):
continue
mycat = self.remotepkgs[mypkg]["CATEGORY"].strip()
fullpkg = mycat+"/"+mypkg[:-5]
+
+ if not getbinpkgsonly and fullpkg in metadata:
+ # Local package overrides the remote one.
+ continue
+
if not self.dbapi._category_re.match(mycat):
writemsg(("!!! Remote binary package has an " + \
"unrecognized category: '%s'\n") % fullpkg,
@@ -754,10 +759,10 @@ class binarytree(object):
# invalid tbz2's can hurt things.
#print "cpv_inject("+str(fullpkg)+")"
self.dbapi.cpv_inject(fullpkg)
- metadata = self.remotepkgs[mypkg]
- for k, v in metadata.items():
- metadata[k] = v.strip()
- self._remotepkgs[fullpkg] = metadata
+ remote_metadata = self.remotepkgs[mypkg]
+ for k, v in remote_metadata.items():
+ remote_metadata[k] = v.strip()
+ self._remotepkgs[fullpkg] = remote_metadata
#print " -- Injected"
except SystemExit, e:
raise