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

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