]> git.saurik.com Git - apt.git/commitdiff
debian/apt.auto-removal.sh: Adjust -dbg exclusion for multi-arch
authorJulian Andres Klode <jak@debian.org>
Mon, 14 Dec 2015 13:12:59 +0000 (14:12 +0100)
committerJulian Andres Klode <jak@debian.org>
Mon, 14 Dec 2015 13:14:04 +0000 (14:14 +0100)
Allow an optional colon followed by anything at the end.

debian/apt.auto-removal.sh

index dc3a1baca2476d18e61f550f193122fd29e50c9c..e7e2ca025b038f732ea8575c33f6fceb3fdf6054 100644 (file)
@@ -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)"