Bug#550584: Initial triggers patch and tracking of highest kernel
On Wed, Mar 09, 2011, Steve McIntyre wrote:
> Neither do I *for definite*, but I know that other tools that rely on
> kernel ABI have been thrown by the sort order of "trunk" vs "1", "2",
> etc. so I'm raising it early in case it matters.
My first reaction was that it was basically the problem of the people
using this name in the first place, but then I figured that if
flash-kernel just did what grub does, nobody would complain. Turns out
grub seems to have special casing for trunk!
it uses version_find_latest() below which calls version_test_gt(),
sounds like exactly what we need, and version_test_gt() starts by
transforming trunk versions to use ~.
local a=`echo $1 | sed -e "$sedexp"`
local b=`echo $2 | sed -e "$sedexp"`
if [ "x$b" = "x" ] ; then
case $a:$b in
*.old:*) a=`echo -n $a | sed -e s/\.old$//` ; cmp=gt ;;
*:*.old) b=`echo -n $b | sed -e s/\.old$//` ; cmp=ge ;;
dpkg --compare-versions "$a" $cmp "$b"
for i in $@ ; do
if version_test_gt "$i" "$a" ; then