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

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