summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-04-20 23:19:45 +0000
committerMike Frysinger <vapier@gentoo.org>2006-04-20 23:19:45 +0000
commit37b94a3fe90923dd5975ebdab8b1c2ac7f5ca3bd (patch)
tree77cd8d1a79a514a11963a2809e8d239792d05bc9
parent97367096ed30fad377fc8a93d775a8c18b356288 (diff)
downloadportage-37b94a3fe90923dd5975ebdab8b1c2ac7f5ca3bd.tar.gz
portage-37b94a3fe90923dd5975ebdab8b1c2ac7f5ca3bd.tar.bz2
portage-37b94a3fe90923dd5975ebdab8b1c2ac7f5ca3bd.zip
if PORTAGE_GPG_DIR is not set then default to ~/.gnupg instead of just dumping an error
svn path=/main/trunk/; revision=3180
-rwxr-xr-xbin/repoman7
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/repoman b/bin/repoman
index fd67ce117..a97611ee0 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -1574,7 +1574,12 @@ else:
if "PORTAGE_GPG_KEY" not in repoman_settings:
raise portage_exception.MissingParameter("PORTAGE_GPG_KEY is unset!")
if "PORTAGE_GPG_DIR" not in repoman_settings:
- raise portage_exception.MissingParameter("PORTAGE_GPG_DIR is unset!")
+ if os.environ.has_key("HOME") and os.access(os.environ["HOME"]+"/.gnupg", os.R_OK):
+ repoman_settings["PORTAGE_GPG_DIR"] = os.environ["HOME"]+"/.gnupg"
+ if quiet < 1:
+ print "Automatically setting PORTAGE_GPG_DIR to",repoman_settings["PORTAGE_GPG_DIR"]
+ else:
+ raise portage_exception.MissingParameter("PORTAGE_GPG_DIR is unset!")
if not os.access(repoman_settings["PORTAGE_GPG_DIR"], os.X_OK):
raise portage_exception.InvalidLocation(
"Unable to access directory: PORTAGE_GPG_DIR='%s'" % \