[stable-2.18] dnf5: use new pkg_gpgcheck option, fallback to deprecated one (#84791) (#84811)

(cherry picked from commit f11dfa7cce)
pull/84842/head
Martin Krizek 10 months ago committed by GitHub
parent a5ce34307f
commit aa5a2fceaa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,2 @@
bugfixes:
- dnf5 - libdnf5 - use ``conf.pkg_gpgcheck`` instead of deprecated ``conf.gpgcheck`` which is used only as a fallback

@ -567,7 +567,14 @@ class Dnf5Module(YumDnf):
elif self.best is not None:
conf.best = self.best
conf.install_weak_deps = self.install_weak_deps
conf.gpgcheck = not self.disable_gpg_check
try:
# raises AttributeError only on getter if not available
conf.pkg_gpgcheck # pylint: disable=pointless-statement
except AttributeError:
# dnf5 < 5.2.7.0
conf.gpgcheck = not self.disable_gpg_check
else:
conf.pkg_gpgcheck = not self.disable_gpg_check
conf.localpkg_gpgcheck = not self.disable_gpg_check
conf.sslverify = self.sslverify
conf.clean_requirements_on_remove = self.autoremove

Loading…
Cancel
Save