X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/8597ee543a7d1d61450542c61512295f9da4fec4..10ec2d23f14cf5d3e4835d9bcb57d0937f803e6a:/debian/apt.auto-removal.sh diff --git a/debian/apt.auto-removal.sh b/debian/apt.auto-removal.sh index 6af5da987..608d950b5 100644 --- a/debian/apt.auto-removal.sh +++ b/debian/apt.auto-removal.sh @@ -18,8 +18,7 @@ config_file="${APT_CONF_D}/01autoremove-kernels" eval $(apt-config shell DPKG Dir::bin::dpkg/f) test -n "$DPKG" || DPKG="/usr/bin/dpkg" - -list="$(${DPKG} -l | awk '/^[ih][^nc][ ]+(linux|kfreebsd|gnumach)-image-[0-9]+\./ && $2 !~ /-dbg$/ && $2 !~ /-dbgsym$/ { print $2,$3; }' \ +list="$("${DPKG}" -l | awk '/^[ih][^nc][ ]+(linux|kfreebsd|gnumach)-image-[0-9]+\./ && $2 !~ /-dbg(:.*)?$/ && $2 !~ /-dbgsym(:.*)?$/ { print $2,$3; }' \ | sed -e 's#^\(linux\|kfreebsd\|gnumach\)-image-##' -e 's#:[^:]\+ # #')" debverlist="$(echo "$list" | cut -d' ' -f 2 | sort --unique --reverse --version-sort)" @@ -39,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 <