summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-03-27 07:01:21 +0000
committerZac Medico <zmedico@gentoo.org>2009-03-27 07:01:21 +0000
commit12be1906f977a1f0a8698f17e9cd5a7ffba37c9d (patch)
treec4018d93f83cf2120d8b85ca49074323e4397831
parenteadae837278f20c4fbda9f9ff29704228cfd7aa6 (diff)
downloadportage-12be1906f977a1f0a8698f17e9cd5a7ffba37c9d.tar.gz
portage-12be1906f977a1f0a8698f17e9cd5a7ffba37c9d.tar.bz2
portage-12be1906f977a1f0a8698f17e9cd5a7ffba37c9d.zip
In config.setcpv(), make sure the current args are really identical to the
previous args before returning early. svn path=/main/trunk/; revision=13227
-rw-r--r--pym/portage/__init__.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index ed07bca12..c4a7a6d61 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -1151,6 +1151,7 @@ class config(object):
self.locked = 0
self.mycpv = None
+ self._setcpv_args_hash = None
self.puse = []
self.modifiedkeys = []
self.uvlist = []
@@ -1204,6 +1205,7 @@ class config(object):
self.make_defaults_use = copy.deepcopy(clone.make_defaults_use)
self.pkgprofileuse = copy.deepcopy(clone.pkgprofileuse)
self.mycpv = copy.deepcopy(clone.mycpv)
+ self._setcpv_args_hash = copy.deepcopy(clone._setcpv_args_hash)
self.configlist = copy.deepcopy(clone.configlist)
self.lookuplist = self.configlist[:]
@@ -2084,14 +2086,17 @@ 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
- if self.mycpv == mycpv:
- return
has_changed = False
self.mycpv = mycpv
cat, pf = catsplit(mycpv)