nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

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

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