summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorNeil Williams <codehelp@debian.org>2016-01-23 15:50:38 +0000
committerNeil Williams <codehelp@debian.org>2016-01-23 16:35:09 +0000
commitd3688d876694bcb5936e30c0a4d308d7c5f3ed28 (patch)
tree9c5796dc1d9200b723f621d6481ca127e2c8f73c /bin
parent0c8cc8919c4bc7a6cea05315a364e09e7d448ce2 (diff)
downloadvmdebootstrap-d3688d876694bcb5936e30c0a4d308d7c5f3ed28.tar.gz
add a message when filling with zeroes which can take some time with large images
Diffstat (limited to 'bin')
-rwxr-xr-xbin/vmdebootstrap5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/vmdebootstrap b/bin/vmdebootstrap
index 169da37..0fbd91e 100755
--- a/bin/vmdebootstrap
+++ b/bin/vmdebootstrap
@@ -474,9 +474,12 @@ class VmDebootstrap(cliapp.Application): # pylint: disable=too-many-public-meth
def optimize_image(self, rootdir):
"""
- Filing up the image with zeros will increase its compression rate
+ Filling up the image with zeros will increase its compression rate
+ Can take an appreciable amount of time in very large images.
"""
if not self.settings['sparse']:
+ base = self.handlers[Base.name]
+ base.message("Optimizing image for compression")
zeros = os.path.join(rootdir, 'ZEROS')
self.runcmd_unchecked(['dd', 'if=/dev/zero', 'of=' + zeros, 'bs=1M'])
runcmd(['rm', '-f', zeros])