From 682040319e5acfced10b7a8f82079db001f6ed14 Mon Sep 17 00:00:00 2001 From: morganamilo Date: Thu, 31 May 2018 16:36:36 +0100 Subject: [PATCH] Add config option for pgp key fetching --- cmd.go | 4 ++++ config.go | 2 ++ install.go | 8 +++++--- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/cmd.go b/cmd.go index aee37e8c..d5706489 100644 --- a/cmd.go +++ b/cmd.go @@ -300,6 +300,10 @@ func handleConfig(option, value string) bool { config.Provides = true case "noprovides": config.Provides = false + case "pgpfetch": + config.PGPFetch = true + case "nopgpfetch": + config.PGPFetch = false case "a", "aur": mode = ModeAUR case "repo": diff --git a/config.go b/config.go index 2ba18df1..cf85b017 100644 --- a/config.go +++ b/config.go @@ -63,6 +63,7 @@ type Configuration struct { CleanAfter bool `json:"cleanAfter"` GitClone bool `json:"gitclone"` Provides bool `json:"provides"` + PGPFetch bool `json:"pgpfetch"` } var version = "5.688" @@ -146,6 +147,7 @@ func defaultSettings(config *Configuration) { config.MakepkgBin = "makepkg" config.NoConfirm = false config.PacmanBin = "pacman" + config.PGPFetch = true config.PacmanConf = "/etc/pacman.conf" config.GpgFlags = "" config.MFlags = "" diff --git a/install.go b/install.go index c34091b1..c4a5829f 100644 --- a/install.go +++ b/install.go @@ -183,9 +183,11 @@ func install(parser *arguments) error { return err } - err = checkPgpKeys(do.Aur, do.Bases, srcinfosStale) - if err != nil { - return err + if config.PGPFetch { + err = checkPgpKeys(do.Aur, do.Bases, srcinfosStale) + if err != nil { + return err + } } }