Don't clean out old resume lists when in --ask or --pretend mode.
authorZac Medico <zmedico@gentoo.org>
Sat, 3 May 2008 21:22:20 +0000 (21:22 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 3 May 2008 21:22:20 +0000 (21:22 -0000)
svn path=/main/trunk/; revision=10141

pym/_emerge/__init__.py

index fab89f17f55d4d2d5b6f5811a1b7d2d365318554..a76d73cbf8cd1a42277099ac868b2d01610316c0 100644 (file)
@@ -7804,11 +7804,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: