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