summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-03-27 09:40:37 +0000
committerZac Medico <zmedico@gentoo.org>2009-03-27 09:40:37 +0000
commitb7e40a3a49bf79eaebc368574d4c49a78b5afc67 (patch)
tree3ad019257813e9717e4d964a8203d0d9bd9fefd7
parentFix typo in comment. (trunk r13230) (diff)
downloadportage-multirepo-b7e40a3a49bf79eaebc368574d4c49a78b5afc67.tar.gz
portage-multirepo-b7e40a3a49bf79eaebc368574d4c49a78b5afc67.tar.bz2
portage-multirepo-b7e40a3a49bf79eaebc368574d4c49a78b5afc67.zip
Make the argument hash in config.setcpv() a little stronger. (trunk r13232)v2.1.6.11
svn path=/main/branches/2.1.6/; revision=13233
-rw-r--r--pym/portage/__init__.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index b209fe65..5df90ab7 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -2076,16 +2076,18 @@ class config(object):
self.modifying()
- args_hash = (id(mycpv), id(mydb))
- if args_hash == self._setcpv_args_hash:
- return
- self._setcpv_args_hash = args_hash
-
pkg = None
if not isinstance(mycpv, basestring):
pkg = mycpv
mycpv = pkg.cpv
mydb = pkg.metadata
+ args_hash = (mycpv, id(pkg))
+ else:
+ args_hash = (mycpv, id(mydb))
+
+ if args_hash == self._setcpv_args_hash:
+ return
+ self._setcpv_args_hash = args_hash
has_changed = False
self.mycpv = mycpv