Skip to content
Snippets Groups Projects
Commit 4601f9c4 authored by Aleksy Barcz's avatar Aleksy Barcz
Browse files

update_debs verbose only if something is to be installed

+ no logs (and no meil) if no packages are to be installed
+ full logs if any package is installed
+ made using simulated install
parent acd20ada
No related branches found
No related tags found
No related merge requests found
......@@ -131,7 +131,10 @@ my $list = join(' ', @sequence);
subst_dpkgcfg() or die "UPDATE ABORTED - unable to modify /etc/dpkg/dpkg.cfg";
my $shall_die = 0;
system("apt-get -y install $list") == 0 or $shall_die = 1;
my $updates_present = system("apt-get -y -s install $list | grep ^Inst 1>/dev/null");
if ($updates_present == 0) {
system("apt-get -y install $list") == 0 or $shall_die = 1;
}
restore_dpkgcfg();
if ($shall_die) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment