dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

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

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