From 130176bcb6ce65c98d5692196c55cc18b4c210e0 Mon Sep 17 00:00:00 2001 From: Andrew Patterson Date: Wed, 6 Jul 2016 13:40:16 -0600 Subject: [PATCH] Add kernels with "+" in the package name to APT::NeverAutoRemove Escape "+" in kernel package names when generating APT::NeverAutoRemove list so it is not treated as a regular expression meta-character. [Changed by David Kalnischkies: let test actually test the change] Closes: #830159 --- debian/apt.auto-removal.sh | 2 +- test/integration/test-kernel-helper-autoremove | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/debian/apt.auto-removal.sh b/debian/apt.auto-removal.sh index e7e2ca025..608d950b5 100644 --- a/debian/apt.auto-removal.sh +++ b/debian/apt.auto-removal.sh @@ -38,7 +38,7 @@ $running_version $previous_version" | sort -u | sed -e '/^$/ d')" kernels="$( (echo "$1 $unamer"; for deb in $debkernels; do echo "$list" | awk "\$2 == \"$deb\" { print \$1; }"; done; ) \ - | sed -e 's#\.#\\.#g' -e '/^$/ d' | sort -u)" + | sed -e 's#\([\.\+]\)#\\\1#g' -e '/^$/ d' | sort -u)" generateconfig() { cat <