Blame SOURCES/0179-Try-to-make-sure-configure.ac-and-grub-rpm-sort-play.patch

ecb9bb
From f742724d51dc84b32a1298cd6bab62f12d887052 Mon Sep 17 00:00:00 2001
57a8ef
From: Peter Jones <pjones@redhat.com>
57a8ef
Date: Mon, 3 Aug 2015 11:46:42 -0400
ecb9bb
Subject: [PATCH 22/23] Try to make sure configure.ac and grub-rpm-sort play
ecb9bb
 nice.
57a8ef
57a8ef
Apparently the test for whether to use grub-rpm-sort and also the
57a8ef
renaming of it to grub2-rpm-sort on the runtime side weren't right.
57a8ef
57a8ef
Related: rhbz#1124074
57a8ef
57a8ef
Signed-off-by: Peter Jones <pjones@redhat.com>
57a8ef
---
57a8ef
 configure.ac              | 2 +-
57a8ef
 util/grub-mkconfig_lib.in | 9 ++++++---
57a8ef
 2 files changed, 7 insertions(+), 4 deletions(-)
57a8ef
57a8ef
diff --git a/configure.ac b/configure.ac
57a8ef
index 273da6c..04c052d 100644
57a8ef
--- a/configure.ac
57a8ef
+++ b/configure.ac
57a8ef
@@ -1549,7 +1549,7 @@ AC_SUBST([LIBDEVMAPPER])
57a8ef
 AC_ARG_ENABLE([rpm-sort],
57a8ef
               [AS_HELP_STRING([--enable-rpm-sort],
57a8ef
                               [enable native rpm sorting of kernels in grub (default=guessed)])])
57a8ef
-if test x"$enable_rpm-sort" = xno ; then
57a8ef
+if test x"$enable_rpm_sort" = xno ; then
57a8ef
   rpm_sort_excuse="explicitly disabled"
57a8ef
 fi
57a8ef
 
57a8ef
diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
57a8ef
index e85b60c..c67a319 100644
57a8ef
--- a/util/grub-mkconfig_lib.in
57a8ef
+++ b/util/grub-mkconfig_lib.in
57a8ef
@@ -33,6 +33,9 @@ fi
57a8ef
 if test "x$grub_mkrelpath" = x; then
57a8ef
   grub_mkrelpath="${bindir}/@grub_mkrelpath@"
57a8ef
 fi
57a8ef
+if test "x$grub_rpm_sort" = x; then
57a8ef
+  grub_rpm_sort="${sbindir}/@grub_rpm_sort@"
57a8ef
+fi
57a8ef
 
57a8ef
 if which gettext >/dev/null 2>/dev/null; then
57a8ef
   :
57a8ef
@@ -213,10 +216,10 @@ version_sort ()
57a8ef
    esac
57a8ef
 }
57a8ef
 
57a8ef
-if [ "x$RPMLIB" = x ]; then
57a8ef
-  kernel_sort=version_sort
57a8ef
+if [ "x$grub_rpm_sort" != x -a -x "$grub_rpm_sort" ]; then
57a8ef
+  kernel_sort="$grub_rpm_sort"
57a8ef
 else
57a8ef
-  kernel_sort="${sbindir}/grub-rpm-sort"
57a8ef
+  kernel_sort=version_sort
57a8ef
 fi
57a8ef
 
57a8ef
 version_test_numeric ()
57a8ef
-- 
57a8ef
2.4.3
57a8ef