Blame SOURCES/0205-Don-t-check-for-rpmvercmp-in-librpm.patch

5593c8
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
5593c8
From: Javier Martinez Canillas <javierm@redhat.com>
5593c8
Date: Fri, 11 Jun 2021 13:13:27 +0200
5593c8
Subject: [PATCH] Don't check for rpmvercmp in librpm
5593c8
5593c8
The rpmvercmp() function was moved from librpm to librpmio. The configure
5593c8
option had some logic to first check if the symbol is in librpm and then
5593c8
librpmio if this check didn't succeed.
5593c8
5593c8
But the logic wasn't working and rpm sorting was always disabled. Instead
5593c8
of trying to fix this logic, let's just remove since the function already
5593c8
moved and there's no need to check librpm anymore. Now it's enabled again:
5593c8
5593c8
  GRUB2 will be compiled with following components:
5593c8
  ...
5593c8
  grub-rpm-sort: Yes
5593c8
  ...
5593c8
5593c8
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
5593c8
---
5593c8
 configure.ac | 19 +++++--------------
5593c8
 1 file changed, 5 insertions(+), 14 deletions(-)
5593c8
5593c8
diff --git a/configure.ac b/configure.ac
d3c3ab
index c7842ec29d8..3c808a72230 100644
5593c8
--- a/configure.ac
5593c8
+++ b/configure.ac
5593c8
@@ -1947,24 +1947,15 @@ if test x"$rpm_sort_excuse" = x ; then
5593c8
 fi
5593c8
 
5593c8
 if test x"$rpm_sort_excuse" = x ; then
5593c8
-  # Check for rpm library.
5593c8
-  AC_CHECK_LIB([rpm], [rpmvercmp], [],
5593c8
-               [rpm_sort_excuse="rpmlib missing rpmvercmp"])
5593c8
-fi
5593c8
-
5593c8
-if test x"$rpm_sort_excuse" = x ; then
5593c8
-   LIBRPM="-lrpm";
5593c8
-   AC_DEFINE([HAVE_RPM], [1],
5593c8
-             [Define to 1 if you have the rpm library.])
5593c8
-fi
5593c8
-
5593c8
-if test x"$LIBRPM" = x ; then
5593c8
-  # Check for rpm library.
5593c8
+  # Check for rpmio library.
5593c8
   AC_CHECK_LIB([rpmio], [rpmvercmp], [],
5593c8
                [rpm_sort_excuse="rpmio missing rpmvercmp"])
5593c8
+fi
5593c8
+
5593c8
+if test x"$rpm_sort_excuse" = x ; then
5593c8
    LIBRPM="-lrpmio";
5593c8
    AC_DEFINE([HAVE_RPMIO], [1],
5593c8
-             [Define to 1 if you have the rpm library.])
5593c8
+             [Define to 1 if you have the rpmio library.])
5593c8
 fi
5593c8
 
5593c8
 AC_SUBST([LIBRPM])