Add ability to invalidate all further autoresume points
authorAndrew Gaffney <agaffney@gentoo.org>
Sat, 12 Sep 2009 05:44:46 +0000 (00:44 -0500)
committerAndrew Gaffney <agaffney@gentoo.org>
Sat, 12 Sep 2009 05:44:46 +0000 (00:44 -0500)
ChangeLog
TODO
modules/catalyst/target/generic.py

index 56bf9b0db21abad8987916ad8c4750c2fd935f33..b9e2b60d7a3a94bcd9dfd442d83be13d84c632ce 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,10 @@
 # Distributed under the GPL v2
 # $Id$
 
+  12 Sep 2009; Andrew Gaffney <agaffney@gentoo.org> TODO,
+  modules/catalyst/target/generic.py:
+  Add ability to invalidate all further autoresume points
+
   12 Sep 2009; Andrew Gaffney <agaffney@gentoo.org> catalyst:
   Remove another unnecessary intermediary variable
 
diff --git a/TODO b/TODO
index baed5bdb053ca7a443af98d590e479d48e87be6b..21fb38628d47c382c2141d8c63d6f5bc9b8b9ac2 100644 (file)
--- a/TODO
+++ b/TODO
@@ -164,6 +164,8 @@ Targets:
   - normal and debug kernels/userlands
 - perform fetches before builds
 - smarter auto-resume/caching
+  - record file/dir metadata (such as for portage_confdir) to invalidate autoresume
+  - one failed autoresume invalidates all remaining autoresume points
   - store failure info
     - attempt normal --resume or equivalent auto-resume
     - remove object from seed/package caches
index a0b53fce23906372480f41d44147eb9d403c2e3f..fdf2dc7ccd256b032a3e97430badc2b73b300718 100644 (file)
@@ -9,6 +9,8 @@ from catalyst.spawn import cmd
 
 class generic_target:
 
+       _autoresume_invalid = False
+
        def __init__(self):
 #              if myspec and addlargs:
 #                      catalyst.util.addl_arg_parse(myspec,addlargs,self.required_values,self.valid_values)
@@ -37,9 +39,12 @@ class generic_target:
        def check_autoresume(self, step=None):
                if "AUTORESUME" in self.settings:
                        if step:
-                               if os.path.exists(self.settings["autoresume_path"] + step):
+                               if self._autoresume_invalid:
+                                       return False
+                               elif os.path.exists(self.settings["autoresume_path"] + step):
                                        return True
                                else:
+                                       self._autoresume_invalid = True
                                        return False
                        else:
                                return True