impl. a better way to suppress output from apt-get update.

This commit is contained in:
Dietmar Maurer 2013-08-02 06:33:36 +02:00
parent a137235a4a
commit f460dc12b1

View File

@ -275,11 +275,13 @@ __PACKAGE__->register_method({
my $cmd = ['apt-get', 'update'];
push @$cmd, '-qq' if $param->{quiet};
print "starting apt-get update\n" if !$param->{quiet};
PVE::Tools::run_command($cmd);
if ($param->{quiet}) {
PVE::Tools::run_command($cmd, outfunc => sub {}, errfunc => sub {});
} else {
PVE::Tools::run_command($cmd);
}
my $pkglist = &$update_pve_pkgstatus();