grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
From: Julian Andres Klode <julian.klode@canonical.com>
To: grub-devel@gnu.org
Cc: Julian Andres Klode <julian.klode@canonical.com>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Daniel Kiper <daniel.kiper@oracle.com>
Subject: [PATCH] Revert "templates: Reinstate unused version comparison functions with warning"
Date: Tue, 30 Jan 2024 13:59:43 +0100	[thread overview]
Message-ID: <20240130125943.3138106-1-julian.klode@canonical.com> (raw)

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 e7a831963e30c6d9c61027a97e50388856c68d03.

Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Daniel Kiper <daniel.kiper@oracle.com>
Signed-off-by: Julian Andres Klode <julian.klode@canonical.com>
---
 util/grub-mkconfig_lib.in | 54 ---------------------------------------
 1 file changed, 54 deletions(-)

diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
index 33e1750ae..08953287c 100644
--- a/util/grub-mkconfig_lib.in
+++ b/util/grub-mkconfig_lib.in
@@ -244,60 +244,6 @@ grub_move_to_front ()
   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
 # ' into \'.
 grub_quote () {
-- 
2.43.0


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

             reply	other threads:[~2024-01-30 13:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-30 12:59 Julian Andres Klode [this message]
2024-02-08 16:28 ` [PATCH] Revert "templates: Reinstate unused version comparison functions with warning" Daniel Kiper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240130125943.3138106-1-julian.klode@canonical.com \
    --to=julian.klode@canonical.com \
    --cc=daniel.kiper@oracle.com \
    --cc=grub-devel@gnu.org \
    --cc=mathieu.desnoyers@efficios.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).