From 8a86cec02d6772c4f9ead9564b37c57b97c91af6 Mon Sep 17 00:00:00 2001 From: Andrew Gaffney Date: Sat, 12 Sep 2009 00:44:46 -0500 Subject: [PATCH] Add ability to invalidate all further autoresume points --- ChangeLog | 4 ++++ TODO | 2 ++ modules/catalyst/target/generic.py | 7 ++++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 56bf9b0d..b9e2b60d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,10 @@ # Distributed under the GPL v2 # $Id$ + 12 Sep 2009; Andrew Gaffney TODO, + modules/catalyst/target/generic.py: + Add ability to invalidate all further autoresume points + 12 Sep 2009; Andrew Gaffney catalyst: Remove another unnecessary intermediary variable diff --git a/TODO b/TODO index baed5bdb..21fb3862 100644 --- 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 diff --git a/modules/catalyst/target/generic.py b/modules/catalyst/target/generic.py index a0b53fce..fdf2dc7c 100644 --- a/modules/catalyst/target/generic.py +++ b/modules/catalyst/target/generic.py @@ -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 -- 2.26.2