summaryrefslogtreecommitdiff
path: root/morphlib/stagingarea.py
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2014-03-10 17:17:01 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2014-03-10 17:27:53 +0000
commitc1d73faab8d3a9ad50e76c57d41ccbf266a88048 (patch)
tree963494ce8e72e429cdb105ca6e5023ff69aa6c4b /morphlib/stagingarea.py
parent444ba7c2f0f3d53753abeff6dfd33681279a3d84 (diff)
downloadmorph-c1d73faab8d3a9ad50e76c57d41ccbf266a88048.tar.gz
Reduce spam from setting up staging area
Make the message "Installing chunk..." be chatty, i.e., only displayed when the user turns verbosity higher. Most of the time the chunk is already unpacked in the cache, so installing it takes a fraction of a second. Add a new message, at default verbosity, when a chunk needs to be unpacked. This can take a while, so a message is appropriate, so the user knows what is happening.
Diffstat (limited to 'morphlib/stagingarea.py')
-rw-r--r--morphlib/stagingarea.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/morphlib/stagingarea.py b/morphlib/stagingarea.py
index 286e5374..dca19c23 100644
--- a/morphlib/stagingarea.py
+++ b/morphlib/stagingarea.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2013 Codethink Limited
+# Copyright (C) 2012-2014 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -160,6 +160,9 @@ class StagingArea(object):
unpacked_artifact = os.path.join(
chunk_cache_dir, os.path.basename(handle.name) + '.d')
if not os.path.exists(unpacked_artifact):
+ self._app.status(
+ msg='Unpacking chunk from cache %(filename)s',
+ filename=os.path.basename(handle.name))
savedir = tempfile.mkdtemp(dir=chunk_cache_dir)
try:
morphlib.bins.unpack_binary_from_file(