Don't clean out old resume lists when in --ask or --pretend mode.
authorZac Medico <zmedico@gentoo.org>
Sat, 3 May 2008 21:23:40 +0000 (21:23 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 3 May 2008 21:23:40 +0000 (21:23 -0000)
(trunk r10141)

svn path=/main/branches/2.1.2/; revision=10142

bin/emerge

index 2122ee0a5448cff090b69579c01fb1d9054a79b7..80cdaf737639cc1ddabfc694ea9e1377931eecff 100755 (executable)
@@ -7815,11 +7815,12 @@ def action_build(settings, trees, mtimedb,
 
                if not success:
                        mydepgraph.display_problems()
-                       # delete the current list and also the backup
-                       # since it's probably stale too.
-                       for k in ("resume", "resume_backup"):
-                               mtimedb.pop(k, None)
-                       mtimedb.commit()
+                       if not (ask or pretend):
+                               # delete the current list and also the backup
+                               # since it's probably stale too.
+                               for k in ("resume", "resume_backup"):
+                                       mtimedb.pop(k, None)
+                               mtimedb.commit()
 
                        return 1
        else: