aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Gentoo.Org>2011-03-31 00:19:54 +0200
committerArfrever Frehtes Taifersar Arahesis <Arfrever@Gentoo.Org>2011-03-31 00:19:54 +0200
commit6f526bf9532b34434f2f5a6860901941ee86382c (patch)
treef8de9ebe9fcd0312659ed53b57a592e73e686598 /bin
parentSimplify calculation of repoman_settings["PORTAGE_GPG_DIR"] in gpgsign(). (diff)
downloadportage-6f526bf9532b34434f2f5a6860901941ee86382c.tar.gz
portage-6f526bf9532b34434f2f5a6860901941ee86382c.tar.bz2
portage-6f526bf9532b34434f2f5a6860901941ee86382c.zip
Minor improvements in gpgsign().
repoman_settings["PORTAGE_GPG_DIR"] is always set.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/repoman9
1 files changed, 4 insertions, 5 deletions
diff --git a/bin/repoman b/bin/repoman
index 985b8ea48..8f363722d 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -2423,16 +2423,15 @@ else:
raise portage.exception.MissingParameter("PORTAGE_GPG_KEY is unset!")
if "PORTAGE_GPG_DIR" not in repoman_settings:
repoman_settings["PORTAGE_GPG_DIR"] = os.path.expanduser("~/.gnupg")
- logging.info("Automatically setting PORTAGE_GPG_DIR to %s" % repoman_settings["PORTAGE_GPG_DIR"])
+ logging.info("Automatically setting PORTAGE_GPG_DIR to '%s'" % repoman_settings["PORTAGE_GPG_DIR"])
repoman_settings["PORTAGE_GPG_DIR"] = os.path.expanduser(repoman_settings["PORTAGE_GPG_DIR"])
if not os.access(repoman_settings["PORTAGE_GPG_DIR"], os.X_OK):
raise portage.exception.InvalidLocation(
"Unable to access directory: PORTAGE_GPG_DIR='%s'" % \
repoman_settings["PORTAGE_GPG_DIR"])
- gpgcmd = "gpg --sign --clearsign --yes "
- gpgcmd+= "--default-key "+repoman_settings["PORTAGE_GPG_KEY"]
- if "PORTAGE_GPG_DIR" in repoman_settings:
- gpgcmd += " --homedir "+repoman_settings["PORTAGE_GPG_DIR"]
+ gpgcmd = "gpg --sign --clearsign --yes"
+ gpgcmd += " --default-key " + repoman_settings["PORTAGE_GPG_KEY"]
+ gpgcmd += " --homedir " + repoman_settings["PORTAGE_GPG_DIR"]
if options.pretend:
print("("+gpgcmd+" "+filename+")")
else: