Make yyoom to import GPG keys automatically

Instead of disabling checking signatures altogether, we just let
yyoom import GPG keys if it needs, same way as yum -y does.

Related-Bug: #1210657
Related-Bug: #1218728
Change-Id: I5bb03e649b158e5e99a905d62b9498acea4e3751
This commit is contained in:
Ivan A. Melnikov 2013-08-30 10:36:13 +04:00
parent 8f8913f19a
commit 07a5e63b6d

View File

@ -289,12 +289,20 @@ def _setup_logging(verbose=True):
root_logger.setLevel(logging.DEBUG if verbose else logging.INFO)
class YyoomBase(yum.YumBase):
def _askForGPGKeyImport(self, po, userid, hexkeyid):
"""Tell yum to import GPG keys if needed
Fixes: https://bugs.launchpad.net/anvil/+bug/1210657
Fixes: https://bugs.launchpad.net/anvil/+bug/1218728
"""
return True
def _get_yum_base():
base = yum.YumBase()
base = YyoomBase()
base.setCacheDir(force=True)
# Fixes: https://bugs.launchpad.net/anvil/+bug/1210657
# See: http://lists.baseurl.org/pipermail/yum-devel/2013-January/009873.html
base._override_sigchecks = True
return base