grub2/0133-Try-to-make-sure-configure.ac-and-grub-rpm-sort-play.patch
Peter Jones bbc6a8998a Rebased to newer upstream for fedora-27
Signed-off-by: Peter Jones <pjones@redhat.com>
2017-08-16 11:14:30 -04:00

61 lines
1.7 KiB
Diff

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