summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-12-12 00:35:38 +0000
committerZac Medico <zmedico@gentoo.org>2008-12-12 00:35:38 +0000
commit1f684c50cb09c6d2ebfc61b2c7ec42d978c402c6 (patch)
treeec4735a66ffae2766e873e8c605f68072ee42b8d
parentebd27b7b8e52c29c9f0d034ac9c88289023d8fc6 (diff)
downloadportage-1f684c50cb09c6d2ebfc61b2c7ec42d978c402c6.tar.gz
portage-1f684c50cb09c6d2ebfc61b2c7ec42d978c402c6.tar.bz2
portage-1f684c50cb09c6d2ebfc61b2c7ec42d978c402c6.zip
When using the old binhost protocol, comparison with the remote
package isn't supported, so the local package is always preferred even if --getbinpkgonly is enabled. Simplify bintree.isremote() so it works the same way regardless of which protocol is used. svn path=/main/trunk/; revision=12209
-rw-r--r--pym/portage/dbapi/bintree.py16
1 files changed, 6 insertions, 10 deletions
diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
index 7c6cd5980..1e9f9aeeb 100644
--- a/pym/portage/dbapi/bintree.py
+++ b/pym/portage/dbapi/bintree.py
@@ -741,8 +741,10 @@ class binarytree(object):
mycat = self.remotepkgs[mypkg]["CATEGORY"].strip()
fullpkg = mycat+"/"+mypkg[:-5]
- if not getbinpkgsonly and fullpkg in metadata:
- # Local package overrides the remote one.
+ if fullpkg in metadata:
+ # When using this old protocol, comparison with the remote
+ # package isn't supported, so the local package is always
+ # preferred even if getbinpkgsonly is enabled.
continue
if not self.dbapi._category_re.match(mycat):
@@ -1011,14 +1013,8 @@ class binarytree(object):
downloaded (or it is only partially downloaded)."""
if self._remotepkgs is None or pkgname not in self._remotepkgs:
return False
- if self._remote_has_index:
- # Presence in self._remotepkgs implies that it's remote. When a
- # package is downloaded, state is updated by self.inject().
- return True
- pkg_path = self.getname(pkgname)
- if os.path.exists(pkg_path) and \
- os.path.basename(pkg_path) not in self.invalids:
- return False
+ # Presence in self._remotepkgs implies that it's remote. When a
+ # package is downloaded, state is updated by self.inject().
return True
def get_use(self, pkgname):