Skip to content

Commit 3f85804

Browse files
Andrew RuthvenAndrew Ruthven
authored andcommitted
Ignore Debian kernel packages with rc status
When 'apt autoremove' is used with kernel packages, they're set to rc which is Remove, leave Conf-files. Ignose those.
1 parent 44c41bc commit 3f85804

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/tests_ports_packages

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1378,7 +1378,7 @@ EOF
13781378
if [ "${DPKGBINARY}" ]; then
13791379
TESTED=1
13801380
KERNEL_PKG_NAMES="linux-image-[0-9]|raspberrypi-kernel|pve-kernel-[0-9]|linux-odroid-5422"
1381-
KERNELS=$(${DPKGBINARY} -l 2> /dev/null | ${GREPBINARY} -E "${KERNEL_PKG_NAMES}" | ${WCBINARY} -l)
1381+
KERNELS=$(${DPKGBINARY} -l 2> /dev/null | ${GREPBINARY} -E "${KERNEL_PKG_NAMES}" | ${GREPBINARY} -v ^rc | ${WCBINARY} -l)
13821382
if [ ${KERNELS} -eq 0 ]; then
13831383
LogText "Result: found no kernels from dpkg -l output, which is unexpected"
13841384
elif [ ${KERNELS} -gt 5 ]; then

0 commit comments

Comments
 (0)