From b0301d608ff73e6bc70d4ca700846b778c5db374 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Mon, 27 Apr 2015 12:55:28 +0000 Subject: Fix regression that caused original_ref to be lost in some builds Commit bd788c7219d8b ("Implement partial builds") caused the original_ref metadata to be lost in some cases. This meant that the metadata for built systems would have original_ref set to a SHA1 hex string, instead of the original named ref that the system was built from. Change-Id: Id31654ad60b411206ccc7ee70b46f005baa209ef --- morphlib/plugins/build_plugin.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/morphlib/plugins/build_plugin.py b/morphlib/plugins/build_plugin.py index b8569ff7..12d69545 100644 --- a/morphlib/plugins/build_plugin.py +++ b/morphlib/plugins/build_plugin.py @@ -288,7 +288,7 @@ class BuildPlugin(cliapp.Plugin): commit = definitions_repo.resolve_ref_to_commit(ref) self.start_build(root_repo_url, commit, build_command, - system_filename, component_names) + system_filename, component_names, original_ref=ref) def _find_artifacts(self, names, root_artifact): found = collections.OrderedDict() @@ -315,7 +315,8 @@ class BuildPlugin(cliapp.Plugin): return self.app.status(msg='Deciding on task order') - srcpool = bc.create_source_pool(repo, commit, system_filename) + srcpool = bc.create_source_pool(repo, commit, system_filename, + original_ref) bc.validate_sources(srcpool) root = bc.resolve_artifacts(srcpool) if not component_names: -- cgit v1.2.1