[gnome-ostree] build: Add --no-clean-results
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-ostree] build: Add --no-clean-results
- Date: Tue, 28 Aug 2012 16:21:59 +0000 (UTC)
commit 59966f28f72217af16b3002ff9c982dfbd6d04a2
Author: Colin Walters <walters verbum org>
Date: Tue Aug 28 12:21:01 2012 -0400
build: Add --no-clean-results
Useful for debugging build failures.
src/ostbuild/pyostbuild/builtin_build.py | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/src/ostbuild/pyostbuild/builtin_build.py b/src/ostbuild/pyostbuild/builtin_build.py
index b37b956..38d6bee 100755
--- a/src/ostbuild/pyostbuild/builtin_build.py
+++ b/src/ostbuild/pyostbuild/builtin_build.py
@@ -247,11 +247,12 @@ class OstbuildBuild(builtins.Builtin):
if statoverride_path is not None:
os.unlink(statoverride_path)
- if os.path.islink(component_src):
- os.unlink(component_src)
- else:
- shutil.rmtree(component_src)
- shutil.rmtree(component_resultdir)
+ if not self.args.no_clean_results:
+ if os.path.islink(component_src):
+ os.unlink(component_src)
+ else:
+ shutil.rmtree(component_src)
+ shutil.rmtree(component_resultdir)
return run_sync_get_output(['ostree', '--repo=' + self.repo,
'rev-parse', build_ref])
@@ -354,6 +355,7 @@ class OstbuildBuild(builtins.Builtin):
parser.add_argument('--force-rebuild', action='store_true')
parser.add_argument('--skip-vcs-matches', action='store_true')
parser.add_argument('--no-compose', action='store_true')
+ parser.add_argument('--no-clean-results', action='store_true')
parser.add_argument('--no-skip-if-unchanged', action='store_true')
parser.add_argument('--compose-only', action='store_true')
parser.add_argument('--shell-on-failure', action='store_true')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]