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

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