From 2f71de25223b615b6fc53db5faa052d94aa4ba55 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sat, 26 Oct 2019 19:48:05 -0700 Subject: [PATCH] Also hold packages selected by apt-mark https://www.virtualmin.com/node/67577 --- software/apt-lib.pl | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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; }