summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-03-27 09:40:15 +0000
committerZac Medico <zmedico@gentoo.org>2009-03-27 09:40:15 +0000
commitff7a169d9847eebe2cee717c662880e83c7559b5 (patch)
treef37865a907ec3be53c685161b091736a84da7910
parent9501dabfa3e4aac788b1dc2e0d5f8d45ed29a5d9 (diff)
downloadportage-ff7a169d9847eebe2cee717c662880e83c7559b5.tar.gz
portage-ff7a169d9847eebe2cee717c662880e83c7559b5.tar.bz2
portage-ff7a169d9847eebe2cee717c662880e83c7559b5.zip
Make the argument hash in config.setcpv() a little stronger.v2.2_rc28
svn path=/main/trunk/; revision=13232
-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 771e720d3..e2328edab 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -2086,16 +2086,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