dnf5: use new pkg_gpgcheck option, fallback to deprecated one (#84791)

pull/84812/head
Martin Krizek 9 months ago committed by GitHub
parent 44966cb8e2
commit f11dfa7cce
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

@ -598,7 +598,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