[gnome-ostree] build: make clearer what changed to cause a rebuild
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-ostree] build: make clearer what changed to cause a rebuild
- Date: Thu, 11 Oct 2012 16:45:20 +0000 (UTC)
commit 84cda409e88a45db21fa336343c79e57b2327620
Author: Colin Walters <walters verbum org>
Date: Thu Oct 11 10:00:31 2012 -0400
build: make clearer what changed to cause a rebuild
src/ostbuild/pyostbuild/builtin_build.py | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/ostbuild/pyostbuild/builtin_build.py b/src/ostbuild/pyostbuild/builtin_build.py
index df688f3..cb5ac60 100755
--- a/src/ostbuild/pyostbuild/builtin_build.py
+++ b/src/ostbuild/pyostbuild/builtin_build.py
@@ -155,6 +155,14 @@ class OstbuildBuild(builtins.Builtin):
def _needs_rebuild(self, previous_metadata, new_metadata):
build_keys = ['config-opts', 'src', 'revision']
for k in build_keys:
+ if (k not in new_metadata):
+ return 'key %r removed from new_metadata' % (k, )
+ if k in previous_metadata:
+ oldval = previous_metadata[k]
+ newval = new_metadata[k]
+ if oldval != newval:
+ return 'key %r differs (%r -> %r)' % (k, oldval, newval)
+
if (k not in new_metadata) or (previous_metadata[k] != new_metadata[k]):
return 'key %r differs' % (k, )
@@ -257,6 +265,7 @@ class OstbuildBuild(builtins.Builtin):
self.cached_patchdir_revision = patches_revision
if ((previous_metadata is not None) and
'patches' in previous_metadata and
+ 'revision' in previous_metadata['patches'] and
previous_metadata['patches']['revision'] == patches_revision):
# Copy over the sha256sums
expanded_component['patches'] = previous_metadata['patches']
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]