[gnome-ostree] build: Do rebuild if we don't have a previous version
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-ostree] build: Do rebuild if we don't have a previous version
- Date: Sun, 9 Sep 2012 18:34:00 +0000 (UTC)
commit 809763fd1244b8010b8938bef4795fbe2842f566
Author: Colin Walters <walters verbum org>
Date: Sun Sep 9 14:33:02 2012 -0400
build: Do rebuild if we don't have a previous version
This bug was introduced in the most recent refactoring.
src/ostbuild/pyostbuild/builtin_build.py | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
---
diff --git a/src/ostbuild/pyostbuild/builtin_build.py b/src/ostbuild/pyostbuild/builtin_build.py
index cef50dd..8fced39 100755
--- a/src/ostbuild/pyostbuild/builtin_build.py
+++ b/src/ostbuild/pyostbuild/builtin_build.py
@@ -142,8 +142,6 @@ class OstbuildBuild(builtins.Builtin):
log("No previous build for '%s' found" % (buildname, ))
if skip_rebuild:
fatal("--compose-only specified but no previous build of %s found" % (buildname, ))
- else:
- return previous_build_version
if 'patches' in expanded_component:
patches_revision = expanded_component['patches']['revision']
@@ -169,14 +167,15 @@ class OstbuildBuild(builtins.Builtin):
force_rebuild = (self.buildopts.force_rebuild or
basename in self.force_build_components)
- rebuild_reason = self._needs_rebuild(previous_metadata, expanded_component)
- if rebuild_reason is None:
- if not force_rebuild:
- log("Reusing cached build at %s" % (previous_vcs_version))
- return previous_build_version
+ if previous_metadata is not None:
+ rebuild_reason = self._needs_rebuild(previous_metadata, expanded_component)
+ if rebuild_reason is None:
+ if not force_rebuild:
+ log("Reusing cached build at %s" % (previous_vcs_version))
+ return previous_build_version
+ else:
+ log("Build forced regardless")
else:
- log("Build forced regardless")
- else:
log("Need rebuild of %s: %s" % (buildname, rebuild_reason, ) )
(fd, temp_metadata_path) = tempfile.mkstemp(suffix='.json', prefix='ostbuild-metadata-')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]