From 1f684c50cb09c6d2ebfc61b2c7ec42d978c402c6 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 12 Dec 2008 00:35:38 +0000 Subject: 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 --- pym/portage/dbapi/bintree.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'pym') 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): -- cgit v1.2.3-1-g7c22