#1 Fix compatibility with newer libdnf versions (Fedora >= 29)
Merged 4 years ago by mvadkert. Opened 4 years ago by frantisekz.
rpms/ frantisekz/rpmdeplint master  into  master

@@ -0,0 +1,34 @@ 

+ From 46db163df1f01f57224b91950427e501c0f4dba1 Mon Sep 17 00:00:00 2001

+ From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= <fzatlouk@redhat.com>

+ Date: Mon, 20 May 2019 17:09:03 +0200

+ Subject: [PATCH] Hotfix for libdnf in Fedora >= 29

+ 

+ ---

+  rpmdeplint/__init__.py | 2 +-

+  1 file changed, 1 insertion(+), 1 deletion(-)

+ 

+ diff --git a/rpmdeplint/__init__.py b/rpmdeplint/__init__.py

+ index 3de8e05..fad7f9d 100644

+ --- a/rpmdeplint/__init__.py

+ +++ b/rpmdeplint/__init__.py

+ @@ -125,7 +125,7 @@

+          self.repos_by_name = {}  #: mapping of (reponame, rpmdeplint.Repo)

+          for repo in repos:

+              repo.download_repodata()

+ -            self._sack.load_yum_repo(repo=repo.as_hawkey_repo(), load_filelists=True)

+ +            self._sack.load_repo(repo=repo.as_hawkey_repo(), load_filelists=True)

+              self.repos_by_name[repo.name] = repo

+  

+      def __enter__(self):

+ @@ -184,7 +184,7 @@

+              results['upgrades'] = g.list_upgrades()

+              results['erasures'] = g.list_erasures()

+          else:

+ -            results['problems'] = g.problems

+ +            results['problems'] = [': '.join(problem) for problem in g.problem_rules()]

+  

+          return install_succeeded, results

+ 

+ --

+ 2.21.0

+ 

file modified
+4
@@ -8,6 +8,7 @@ 

  License:        GPLv2+

  URL:            https://pagure.io/rpmdeplint

  Source0:        https://files.pythonhosted.org/packages/source/r/%{name}/%{name}-%{upstream_version}.tar.gz

+ Patch0:         0001-Hotfix-for-libdnf-in-Fedora-29.patch

  BuildArch:      noarch

  

  # The base package is just the CLI, which pulls in the rpmdeplint
@@ -42,6 +43,9 @@ 

  

  %prep

  %setup -q -n %{name}-%{upstream_version}

+ 

+ %patch0 -p1

+ 

  rm -rf rpmdeplint.egg-info

  

  %build

There is no load_yum_repo function in libdnf from Fedora 29 and newer. This replaces it with load_repo function.

This is to be merged also into F30 and F29 branches in dist-git.

rebased onto bd9c910

4 years ago

I've added fix for cases where rpmdeplint should report failure, by @kparal .

So, right now, with this PR, rpmdeplint should work just fine with latest libdnf.

rebased onto 48637ce

4 years ago

@mvadkert We would really need this pushed, now. Is there any reason to delay this? We have it deployed in taskotron and it seems to work fine (certainly better than completely broken). If you don't have time to do new builds and updates, give @frantisekz commit access to this package, he'll do it. Thanks!

Pull-Request has been merged by mvadkert

4 years ago