From 18ef2f8c0dd0aa3e331e7a300755f6d6dea9fac1 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Tue, 24 Sep 2019 17:29:49 +0200 Subject: [PATCH] print out fianl commpressed archive size and format better Signed-off-by: Thomas Lamprecht --- PVE/AAB.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/PVE/AAB.pm b/PVE/AAB.pm index 072a495..9a9a456 100644 --- a/PVE/AAB.pm +++ b/PVE/AAB.pm @@ -645,7 +645,7 @@ sub finalize { } else { die "unable to detect size\n"; } - $self->logmsg ("$size MB\n"); + $self->logmsg ("uncompressed size: $size MB\n"); $self->write_config ("$rootdir/etc/appliance.info", $size); @@ -657,7 +657,12 @@ sub finalize { $self->run_command ("tar cpf $target --numeric-owner -C '$rootdir' ./etc/appliance.info"); $self->run_command ("tar rpf $target --numeric-owner -C '$rootdir' --exclude ./etc/appliance.info ."); + + $self->logmsg ("compressing archive\n"); $self->run_command ("gzip $target"); + + my $target_size = int(-s "$target.gz") >> 20; + $self->logmsg ("created '$target.gz' with size: $target_size MB\n"); } sub enter { -- 2.39.2