Also hold packages selected by apt-mark https://www.virtualmin.com/node/67577

This commit is contained in:
Jamie Cameron
2019-10-26 19:48:05 -07:00
parent b5302d6451
commit 2f71de2522

View File

@@ -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(<PKGS>) {
if (/^([^:\s]+)/) {
$hold{$1} = 1;
}
}
close(PKGS);
&reset_environment();
}
return grep { !$hold{$_->{'name'}} } @pkgs;
}