From: Zac Medico Date: Sun, 17 Sep 2006 20:32:15 +0000 (-0000) Subject: Use mtimedb.filename == None to disable mtimedb writes (instead of /dev/null). X-Git-Tag: v2.1.1-r1~67 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a67949d1f2c4462c61d37bbea29e872a13de3b62;p=portage.git Use mtimedb.filename == None to disable mtimedb writes (instead of /dev/null). svn path=/main/trunk/; revision=4468 --- diff --git a/bin/emerge b/bin/emerge index 05059aa92..95d41bf9e 100755 --- a/bin/emerge +++ b/bin/emerge @@ -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 \ diff --git a/pym/portage.py b/pym/portage.py index 775fc4385..551b4441b 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -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.