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

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