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

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