Blame SOURCES/dnf-plugin-spacewalk-2.8.5-7-el8-to-dnf-plugin-spacewalk-2.8.5-8-el8.patch

906f4e
diff --git a/dnf-plugin-spacewalk.spec b/dnf-plugin-spacewalk.spec
906f4e
index e20e59f..24a5b5d 100644
906f4e
--- a/dnf-plugin-spacewalk.spec
906f4e
+++ b/dnf-plugin-spacewalk.spec
906f4e
@@ -12,7 +12,7 @@
906f4e
 Summary: DNF plugin for Spacewalk
906f4e
 Name: dnf-plugin-spacewalk
906f4e
 Version: 2.8.5
906f4e
-Release: 7%{?dist}
906f4e
+Release: 8%{?dist}
906f4e
 License: GPLv2
906f4e
 Source0: https://github.com/spacewalkproject/spacewalk/archive/%{name}-%{version}.tar.gz
906f4e
 URL:     https://github.com/spacewalkproject/spacewalk
906f4e
@@ -24,9 +24,11 @@ Requires: dnf-plugins-core
906f4e
 Requires: librepo >= 1.7.15
906f4e
 %if 0%{?fedora}
906f4e
 Obsoletes: yum-rhn-plugin < 2.7
906f4e
+Requires: dnf >= 4.0.9
906f4e
 %endif
906f4e
 %if 0%{?rhel} >= 8
906f4e
 Provides: yum-rhn-plugin = %{version}
906f4e
+Requires: dnf >= 4.0.9
906f4e
 %endif
906f4e
 
906f4e
 %description
906f4e
@@ -111,6 +113,9 @@ install -m 644 actions/errata.py %{buildroot}%{python3_sitelib}/rhn/actions/
906f4e
 %endif
906f4e
 
906f4e
 %changelog
906f4e
+* Mon Dec 10 2018 Michael Mraka <michael.mraka@redhat.com> 2.8.5-8
906f4e
+- Resolves: #1637980 - use new api for http headers (michael.mraka@redhat.com)
906f4e
+
906f4e
 * Wed Oct 31 2018 Tomas Kasparek <tkasparek@redhat.com> 2.8.5-7
906f4e
 - Resolves: rhbz#1633298 - librepo dependency is not added automatically (michael.mraka@redhat.com)
906f4e
 
906f4e
diff --git a/spacewalk.py b/spacewalk.py
906f4e
index e0b418b..61bc5d8 100644
906f4e
--- a/spacewalk.py
906f4e
+++ b/spacewalk.py
906f4e
@@ -242,11 +242,11 @@ class  SpacewalkRepo(dnf.repo.Repo):
906f4e
         else:
906f4e
             self.disable()
906f4e
 
906f4e
-        if hasattr(self, '_repo'):
906f4e
-            # dnf > 3.6.0
906f4e
+        if hasattr(self, 'set_http_headers'):
906f4e
+            # dnf > 4.0.9  on RHEL 8, Fedora 29/30
906f4e
             http_headers = self.create_http_headers()
906f4e
             if http_headers:
906f4e
-                self._repo.setHttpHeaders(http_headers)
906f4e
+                self.set_http_headers(http_headers)
906f4e
 
906f4e
     def create_http_headers(self):
906f4e
         http_headers = []