From: Mark Huang Date: Tue, 9 May 2006 16:43:04 +0000 (+0000) Subject: - (re)install any GPG signing keys before running yum X-Git-Tag: myplc-0_4-rc1~3 X-Git-Url: http://git.onelab.eu/?p=nodeupdate.git;a=commitdiff_plain;h=232aebe04e6dd2d57eec1a8209768ece6f0bf9a5 - (re)install any GPG signing keys before running yum --- diff --git a/NodeUpdate.py b/NodeUpdate.py index 41d5880..f863403 100644 --- a/NodeUpdate.py +++ b/NodeUpdate.py @@ -65,6 +65,8 @@ YUM_PATH = "/usr/bin/yum" RPM_PATH = "/bin/rpm" +RPM_GPG_PATH = "/etc/pki/rpm-gpg" + # location of file containing http/https proxy info, if needed PROXY_FILE = '/etc/planetlab/http_proxy' @@ -154,6 +156,14 @@ class NodeUpdate: return 0 + def InstallKeys( self ): + Message( "\nRemoving any existing GPG signing keys from the RPM database" ) + os.system( "%s --allmatches -e gpg-pubkey" % RPM_PATH ) + + Message( "\nInstalling all GPG signing keys in %s" % RPM_GPG_PATH ) + os.system( "%s --import %s/*" % (RPM_PATH, RPM_GPG_PATH) ) + + def ClearRebootFlag( self ): os.system( "/bin/rm -rf %s" % REBOOT_FLAG ) @@ -278,6 +288,7 @@ if __name__ == "__main__": Error( "Unable to initialize." ) else: nodeupdate.RemoveRPMS() + nodeupdate.InstallKeys() nodeupdate.CheckForUpdates() Message( "\nUpdate complete." )