Revert "templates: Reinstate unused version comparison functions with warning"
We reinstated these functions before the 2.12 release with a warning such that users upgrading to 2.12 who had custom scripts using them would not get broken in the upgrade and agreed to remove them after the 2.12 release. This removes them accordingly. This reverts commit e7a831963 (templates: Reinstate unused version comparison functions with warning). Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Daniel Kiper <daniel.kiper@oracle.com> Signed-off-by: Julian Andres Klode <julian.klode@canonical.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
parent
4380c2d8ad
commit
04d2a50f31
@ -244,60 +244,6 @@ grub_move_to_front ()
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
version_test_numeric ()
|
|
||||||
{
|
|
||||||
grub_warn "version_test_numeric() is deprecated. Use version_sort() instead."
|
|
||||||
version_test_numeric_a="$1"
|
|
||||||
version_test_numeric_cmp="$2"
|
|
||||||
version_test_numeric_b="$3"
|
|
||||||
if [ "$version_test_numeric_a" = "$version_test_numeric_b" ] ; then
|
|
||||||
case "$version_test_numeric_cmp" in
|
|
||||||
ge|eq|le) return 0 ;;
|
|
||||||
gt|lt) return 1 ;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
if [ "$version_test_numeric_cmp" = "lt" ] ; then
|
|
||||||
version_test_numeric_c="$version_test_numeric_a"
|
|
||||||
version_test_numeric_a="$version_test_numeric_b"
|
|
||||||
version_test_numeric_b="$version_test_numeric_c"
|
|
||||||
fi
|
|
||||||
if (echo "$version_test_numeric_a" ; echo "$version_test_numeric_b") | version_sort | head -n 1 | grep -qx "$version_test_numeric_b" ; then
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
version_test_gt ()
|
|
||||||
{
|
|
||||||
grub_warn "version_test_gt() is deprecated. Use version_sort() instead."
|
|
||||||
version_test_gt_a="`echo "$1" | sed -e "s/[^-]*-//"`"
|
|
||||||
version_test_gt_b="`echo "$2" | sed -e "s/[^-]*-//"`"
|
|
||||||
version_test_gt_cmp=gt
|
|
||||||
if [ "x$version_test_gt_b" = "x" ] ; then
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
case "$version_test_gt_a:$version_test_gt_b" in
|
|
||||||
*.old:*.old) ;;
|
|
||||||
*.old:*) version_test_gt_a="`echo "$version_test_gt_a" | sed -e 's/\.old$//'`" ; version_test_gt_cmp=gt ;;
|
|
||||||
*:*.old) version_test_gt_b="`echo "$version_test_gt_b" | sed -e 's/\.old$//'`" ; version_test_gt_cmp=ge ;;
|
|
||||||
esac
|
|
||||||
version_test_numeric "$version_test_gt_a" "$version_test_gt_cmp" "$version_test_gt_b"
|
|
||||||
return "$?"
|
|
||||||
}
|
|
||||||
|
|
||||||
version_find_latest ()
|
|
||||||
{
|
|
||||||
grub_warn "version_find_latest() is deprecated. Use version_sort() instead."
|
|
||||||
version_find_latest_a=""
|
|
||||||
for i in "$@" ; do
|
|
||||||
if version_test_gt "$i" "$version_find_latest_a" ; then
|
|
||||||
version_find_latest_a="$i"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
echo "$version_find_latest_a"
|
|
||||||
}
|
|
||||||
|
|
||||||
# One layer of quotation is eaten by "" and the second by sed; so this turns
|
# One layer of quotation is eaten by "" and the second by sed; so this turns
|
||||||
# ' into \'.
|
# ' into \'.
|
||||||
grub_quote () {
|
grub_quote () {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user