remove-old-kernels: specify installed pkgs as NAME=E:V-R rather than by their APT id

The APT id (with a #) can change in different versions of APT, but the
provided NAME=E:V-R remains the same.

This is useful for APT which adds disttags and buildtimes to the VerStrs.

# Conflicts:
#	remove-old-kernels
This commit is contained in:
Ivan Zakharyaschev 2019-05-28 14:07:30 +03:00
parent f1fcf51f88
commit 03e0c8c7e7

View File

@ -85,7 +85,7 @@ do
[ "$comparever" -lt 0 ] && continue
fi
echo " $kernel"
apt_args_list="$apt_args_list $(rpm -q --queryformat '%{NAME}#%{EPOCH}:%{VERSION}-%{RELEASE}\n' $kernel \
apt_args_list="$apt_args_list $(rpm -q --queryformat '%{NAME}=%{EPOCH}:%{VERSION}-%{RELEASE}\n' $kernel \
| sed -e "s,(none):,,g")"
done
echo