From 426ea9ff6df960a80362e20be692d71209ad6210 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Hertzog?= Date: Tue, 15 Dec 2020 09:15:27 +0100 Subject: [PATCH] Don't try to put on hold non-installed packages Fixes #24 --- kali-config/common/hooks/live/kali-hacks.chroot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kali-config/common/hooks/live/kali-hacks.chroot b/kali-config/common/hooks/live/kali-hacks.chroot index cd856a1..bde4ac4 100755 --- a/kali-config/common/hooks/live/kali-hacks.chroot +++ b/kali-config/common/hooks/live/kali-hacks.chroot @@ -26,7 +26,7 @@ fi # Mark kernel related packages on hold so that they are not upgraded in # the live system -for pkg in $(dpkg-query -W -f'${binary:Package}\n' 'linux-image-*' 'linux-headers-*' 'linux-kbuild-*') +for pkg in $(dpkg-query -W -f'${db:Status-Status} ${binary:Package}\n' 'linux-image-*' 'linux-headers-*' 'linux-kbuild-*' | sed -ne 's/^installed //p') do apt-mark hold $pkg done