]> git.proxmox.com Git - aab.git/commitdiff
print out fianl commpressed archive size and format better
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 24 Sep 2019 15:29:49 +0000 (17:29 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 24 Sep 2019 15:29:49 +0000 (17:29 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/AAB.pm

index 072a495ad3f6c981a7beecaf5aadbbdd2d86762f..9a9a456436e3b2cf6321908574f3d6b898ca6eae 100644 (file)
@@ -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 {