summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2015-03-31 10:51:08 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2015-03-31 10:57:55 +0000
commit10ce3a9b63fdea3d36b8b646d70d9473c1d816cb (patch)
treec6bbd120c573119c6bab951e1ab1ea3cd8510c05
parent2b580853160569ce1d97e88fa32929b29c03db6a (diff)
downloadmorph-10ce3a9b63fdea3d36b8b646d70d9473c1d816cb.tar.gz
build: Clearer messages when creating temporary build branches
The temporary build branch (--local-changes=include) feature can be convenient, but it is also slow, and causes the resulting system to be 'unreproducible' (built from temporary commits). Before: $ morph build systems/devel-system-x86_64-generic.morph 2015-03-31 10:47:18 Starting build 53546647f92a4283bf96e33ea93e767e 2015-03-31 10:47:18 Collecting morphologies involved in building systems/devel-system-x86_64-generic.morph from master 2015-03-31 10:47:25 Building file:///src/ws/master/baserock/baserock/definitions 7735ec20d13490058a3d7758f79471637ce1ae71 systems/devel-system-x86_64-generic.morph 2015-03-31 10:47:25 Deciding on task order ... After: $ morph build systems/devel-system-x86_64-generic.morph 2015-03-31 10:46:21 Looking for uncommitted changes (pass --local-changes=ignore to skip) 2015-03-31 10:46:21 Creating temporary branch in /src/ws/master/baserock/baserock/definitions named refs/heads/baserock/builds/f0b21fe240b244edb7e4142b6e201658/8df11f234ab24d22a9616ce911542332 2015-03-31 10:46:28 Building file:///src/ws/master/baserock/baserock/definitions 7735ec20d13490058a3d7758f79471637ce1ae71 systems/devel-system-x86_64-generic.morph 2015-03-31 10:46:28 Deciding on task order ... Change-Id: I21a3e65c29adf0b07f743289c6b3f0f4dddc34be
-rw-r--r--morphlib/buildbranch.py5
-rw-r--r--morphlib/plugins/build_plugin.py5
2 files changed, 6 insertions, 4 deletions
diff --git a/morphlib/buildbranch.py b/morphlib/buildbranch.py
index afcd832d..2a2530b0 100644
--- a/morphlib/buildbranch.py
+++ b/morphlib/buildbranch.py
@@ -303,9 +303,8 @@ def pushed_build_branch(bb, loader, changes_need_pushing, name, email,
build_uuid, status):
with contextlib.closing(bb) as bb:
def report_add(gd, build_ref, changed):
- status(msg='Adding uncommitted changes '\
- 'in %(dirname)s to %(ref)s',
- dirname=gd.dirname, ref=build_ref, chatty=True)
+ status(msg='Creating temporary branch in %(dirname)s '\
+ 'named %(ref)s', dirname=gd.dirname, ref=build_ref)
changes_made = bb.add_uncommitted_changes(add_cb=report_add)
unpushed = any(bb.get_unpushed_branches())
diff --git a/morphlib/plugins/build_plugin.py b/morphlib/plugins/build_plugin.py
index 2cc395fc..a5502180 100644
--- a/morphlib/plugins/build_plugin.py
+++ b/morphlib/plugins/build_plugin.py
@@ -199,9 +199,12 @@ class BuildPlugin(cliapp.Plugin):
email = morphlib.git.get_user_email(self.app.runcmd)
build_ref_prefix = self.app.settings['build-ref-prefix']
- self.app.status(msg='Starting build %(uuid)s', uuid=build_uuid)
+ self.app.status(msg='Looking for uncommitted changes (pass '
+ '--local-changes=ignore to skip)')
+
self.app.status(msg='Collecting morphologies involved in '
'building %(system)s from %(branch)s',
+ chatty=True,
system=system_filename,
branch=sb.system_branch_name)