Use copy.deepcopy() to ensure that state comparison works properly.
authorZac Medico <zmedico@gentoo.org>
Thu, 6 Jul 2006 19:58:39 +0000 (19:58 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 6 Jul 2006 19:58:39 +0000 (19:58 -0000)
svn path=/main/trunk/; revision=3808

pym/portage.py

index 6061695fa8e1eba7c7c35e9114585e82105d90bf..a132da574bca32c416dd553211089c3fe5cb8a4b 100644 (file)
@@ -7127,7 +7127,7 @@ class MtimeDB(dict):
                                writemsg("Deleting invalid mtimedb key: %s\n" % str(k))
                                del d[k]
                self.update(d)
-               self._clean_data = d
+               self._clean_data = copy.deepcopy(d)
 
        def commit(self):
                d = {}
@@ -7135,7 +7135,7 @@ class MtimeDB(dict):
                # Only commit if the internal state has changed.
                if d != self._clean_data:
                        commit_mtimedb(mydict=d, filename=self.filename)
-                       self._clean_data = d
+                       self._clean_data = copy.deepcopy(d)
 
 def create_trees(config_root="/", target_root="/", trees=None):
        if trees is None: