[jhbuild] [buildscript] force chosen phase to be executed (GNOME bug 583515)
- From: Frederic Peters <fpeters src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [jhbuild] [buildscript] force chosen phase to be executed (GNOME bug 583515)
- Date: Tue, 11 Aug 2009 19:40:28 +0000 (UTC)
commit 0aeaa58248cec401a529cedbaa230a46e241253a
Author: Frédéric Péters <fpeters 0d be>
Date: Tue Aug 11 21:37:16 2009 +0200
[buildscript] force chosen phase to be executed (GNOME bug 583515)
If there is an error and a new phase is selected (be it by the user or
an automatic system), the chosen phase must absolutely be executed, it
should in no condition be skipped automatically. This commit introduces
a new force_phase variable that identifies this situation and skip the
skip check.
jhbuild/frontends/buildscript.py | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/jhbuild/frontends/buildscript.py b/jhbuild/frontends/buildscript.py
index 1283a42..5d6a6c0 100644
--- a/jhbuild/frontends/buildscript.py
+++ b/jhbuild/frontends/buildscript.py
@@ -109,10 +109,17 @@ class BuildScript:
build_phases = phases
phase = None
num_phase = 0
+
+ # if there is an error and a new phase is selected (be it by the
+ # user or an automatic system), the chosen phase must absolutely
+ # be executed, it should in no condition be skipped automatically.
+ # The force_phase variable flags that condition.
+ force_phase = False
+
while num_phase < len(build_phases):
last_phase, phase = phase, build_phases[num_phase]
try:
- if module.skip_phase(self, phase, last_phase):
+ if not force_phase and module.skip_phase(self, phase, last_phase):
num_phase += 1
continue
except SkipToEnd:
@@ -148,6 +155,7 @@ class BuildScript:
newphase = self.handle_error(module, phase,
nextphase, error,
altphases)
+ force_phase = True
if newphase == 'fail':
failures.append(module.name)
failed = True
@@ -177,6 +185,7 @@ class BuildScript:
# the inserted one
del build_phases[num_phase+1]
else:
+ force_phase = False
num_phase += 1
self.end_module(module.name, failed)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]