summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Firth <dan.firth@codethink.co.uk>2013-10-28 15:24:30 +0000
committerDaniel Firth <dan.firth@codethink.co.uk>2013-10-28 15:24:30 +0000
commitc6b5103bf5e7cea79363311313886e27d949e39f (patch)
tree3b91ea708914a404d2dbd285e587624c8fb8c7f7
parent89c110e30c58cc9b2da8cb7d5631a31cb1d3cc12 (diff)
downloadmorph-c6b5103bf5e7cea79363311313886e27d949e39f.tar.gz
Tidy up debug output of morph build
-rw-r--r--morphlib/buildcommand.py6
-rw-r--r--morphlib/plugins/branch_and_merge_plugin.py2
-rw-r--r--morphlib/stagingarea.py5
-rw-r--r--morphlib/util.py11
4 files changed, 11 insertions, 13 deletions
diff --git a/morphlib/buildcommand.py b/morphlib/buildcommand.py
index b587aa9a..cbcc39fd 100644
--- a/morphlib/buildcommand.py
+++ b/morphlib/buildcommand.py
@@ -395,8 +395,10 @@ class BuildCommand(object):
if artifact.source.build_mode == 'bootstrap':
if not self.in_same_stratum(artifact, target_artifact):
continue
- self.app.status(msg='Installing chunk %(chunk_name)s',
- chunk_name=artifact.name)
+ self.app.status(msg='Installing chunk %(chunk_name)s '
+ 'from cache %(cache)s',
+ chunk_name=artifact.name,
+ cache=artifact.cache_key[:7])
handle = self.lac.get(artifact)
staging_area.install_artifact(handle)
diff --git a/morphlib/plugins/branch_and_merge_plugin.py b/morphlib/plugins/branch_and_merge_plugin.py
index 990fe100..9961fcf3 100644
--- a/morphlib/plugins/branch_and_merge_plugin.py
+++ b/morphlib/plugins/branch_and_merge_plugin.py
@@ -1744,7 +1744,7 @@ class BranchAndMergePlugin(cliapp.Plugin):
self.app.runcmd(['git', 'add'] + changed_files,
cwd=repo_dir, env=env)
- self.app.status(msg='%(repo)s: Update morphologies to use '
+ self.app.status(msg='%(repo)s: Updating morphologies to use '
'build branch instead of "%(branch)s"',
repo=repo, branch=system_branch)
diff --git a/morphlib/stagingarea.py b/morphlib/stagingarea.py
index 3cd3818c..286e5374 100644
--- a/morphlib/stagingarea.py
+++ b/morphlib/stagingarea.py
@@ -156,9 +156,6 @@ class StagingArea(object):
'''
- self._app.status(msg='Installing artifact %s' %
- getattr(handle, 'name', 'unknown name'))
-
chunk_cache_dir = os.path.join(self._app.settings['tempdir'], 'chunks')
unpacked_artifact = os.path.join(
chunk_cache_dir, os.path.basename(handle.name) + '.d')
@@ -296,7 +293,7 @@ class StagingArea(object):
if not self.use_chroot:
do_not_mount_dirs += [temp_dir]
- self._app.status(msg="Not mounting dirs %r" % do_not_mount_dirs)
+ logging.debug("Not mounting dirs %r" % do_not_mount_dirs)
real_argv = ['linux-user-chroot', '--chdir', cwd, '--unshare-net']
for d in morphlib.fsutils.invert_paths(os.walk(chroot_dir),
diff --git a/morphlib/util.py b/morphlib/util.py
index 53a9e283..1ccb0949 100644
--- a/morphlib/util.py
+++ b/morphlib/util.py
@@ -178,16 +178,15 @@ def log_dict_diff(app, cur, pre): # pragma: no cover
for key in dictA.keys():
if key not in dictB:
app.status(msg="New environment: %(key)s = %(value)s",
- key=key, value=dictA[key],
- chatty=True)
+ key=key, value=dictA[key], chatty=True)
elif dictA[key] != dictB[key]:
- app.status(msg= \
- "Environment changed: %(key)s = %(valA)s to %(key)s = %(valB)s"
- % {"key": key, "valA": dictA[key], "valB": dictB[key]})
+ app.status(msg="Environment changed: \
+ %(key)s = %(valA)s to %(key)s = %(valB)s",
+ key=key, valA=dictA[key], valB=dictB[key], chatty=True)
for key in dictB.keys():
if key not in dictA:
app.status(msg="Environment removed: %(key)s = %(value)s",
- key=key, value=dictB[key])
+ key=key, value=dictB[key], chatty=True)
# This acquired from rdiff-backup which is GPLv2+ and a patch from 2011