diff options
author | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-12-25 19:38:51 (GMT) |
---|---|---|
committer | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-12-25 19:38:51 (GMT) |
commit | 4ce76be4be0ad1b3561d5b6319bc1fff5a1c50c8 (patch) | |
tree | 36470b29e09896c29cad98db516549929977c73e /devbot | |
parent | 69d077f81fd00cb9b462030ffb6b8cc8cd9b25c4 (diff) |
Clean build state when doing a full build
Diffstat (limited to 'devbot')
-rw-r--r-- | devbot/build.py | 1 | ||||
-rw-r--r-- | devbot/state.py | 12 |
2 files changed, 11 insertions, 2 deletions
diff --git a/devbot/build.py b/devbot/build.py index 1e33c70..6a4d553 100644 --- a/devbot/build.py +++ b/devbot/build.py @@ -49,6 +49,7 @@ def build(full=False): _ccache_reset() if full or state.full_build_is_required(): + state.clean_build_state() clean() state.full_build_touch() diff --git a/devbot/state.py b/devbot/state.py index b44652f..7c2a839 100644 --- a/devbot/state.py +++ b/devbot/state.py @@ -89,13 +89,21 @@ def full_build_touch(): full_build["last"] = config.get_full_build() _save_state(_FULL_BUILD, full_build) +def clean_build_state(): + try: + for name in _BUILT_MODULES, _FULL_BUILD: + os.unlink(_get_state_path(name)) + except OSError: + pass + def clean(): _state = None print "Deleting state" + clean_build_state() + try: - for name in _BUILT_MODULES, _SYSTEM_CHECK, _FULL_BUILD: - os.unlink(_get_state_path(name)) + os.unlink(_get_state_path(_SYSTEM_CHECK)) except OSError: pass |