print out fianl commpressed archive size and format better
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
1e25020c9b
commit
18ef2f8c0d
|
@ -645,7 +645,7 @@ sub finalize {
|
||||||
} else {
|
} else {
|
||||||
die "unable to detect size\n";
|
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);
|
$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 cpf $target --numeric-owner -C '$rootdir' ./etc/appliance.info");
|
||||||
$self->run_command ("tar rpf $target --numeric-owner -C '$rootdir' --exclude ./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");
|
$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 {
|
sub enter {
|
||||||
|
|
Loading…
Reference in New Issue