Use mtimedb.filename == None to disable mtimedb writes (instead of /dev/null).
authorZac Medico <zmedico@gentoo.org>
Sun, 17 Sep 2006 20:32:15 +0000 (20:32 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 17 Sep 2006 20:32:15 +0000 (20:32 -0000)
svn path=/main/trunk/; revision=4468

bin/emerge
pym/portage.py

index 05059aa921f3340b4c1330587ca7bb8fa64e7edb..95d41bf9e9de0d55fe44b789bbd5cdd177bed030 100755 (executable)
@@ -3537,7 +3537,7 @@ def action_build(settings, trees, mtimedb,
                        if "--fetchonly" in myopts:
                                """ parallel-fetch uses --resume --fetchonly and we don't want
                                it to write the mtimedb"""
-                               mtimedb.filename = "/dev/null"
+                               mtimedb.filename = None
                        mergetask.merge(mtimedb["resume"]["mergelist"], favorites, mtimedb)
                else:
                        if "resume" in mtimedb and \
index 775fc43856949b26e596bf652830ec5243a833a7..551b4441bfd425b680f92501c518ff4b54399d92 100644 (file)
@@ -6732,6 +6732,8 @@ class MtimeDB(dict):
                self._clean_data = copy.deepcopy(d)
 
        def commit(self):
+               if not self.filename:
+                       return
                d = {}
                d.update(self)
                # Only commit if the internal state has changed.