diff --git a/software/apt-lib.pl b/software/apt-lib.pl index 2db5c4e96..a93efc105 100755 --- a/software/apt-lib.pl +++ b/software/apt-lib.pl @@ -403,6 +403,19 @@ if (&has_command("aptitude")) { &reset_environment(); } +# Get holds from apt-mark +if (&has_command("apt-mark")) { + &clean_language(); + &open_execute_command(PKGS, "apt-mark showhost 2>/dev/null", 1, 1); + while() { + if (/^([^:\s]+)/) { + $hold{$1} = 1; + } + } + close(PKGS); + &reset_environment(); + } + return grep { !$hold{$_->{'name'}} } @pkgs; }