1 |
commit: 54e35da1a38b1e3c94afc36f10edd97b999083db |
2 |
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Gentoo <DOT> Org> |
3 |
AuthorDate: Wed Mar 30 20:32:45 2011 +0000 |
4 |
Commit: Arfrever Frehtes Taifersar Arahesis <arfrever <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 30 20:32:45 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=54e35da1 |
7 |
|
8 |
Simplify calculation of repoman_settings["PORTAGE_GPG_DIR"] in gpgsign(). |
9 |
os.path.expanduser() works even when HOME environment variable is not set. |
10 |
|
11 |
--- |
12 |
bin/repoman | 7 ++----- |
13 |
1 files changed, 2 insertions(+), 5 deletions(-) |
14 |
|
15 |
diff --git a/bin/repoman b/bin/repoman |
16 |
index d48b9d1..985b8ea 100755 |
17 |
--- a/bin/repoman |
18 |
+++ b/bin/repoman |
19 |
@@ -2422,11 +2422,8 @@ else: |
20 |
if "PORTAGE_GPG_KEY" not in repoman_settings: |
21 |
raise portage.exception.MissingParameter("PORTAGE_GPG_KEY is unset!") |
22 |
if "PORTAGE_GPG_DIR" not in repoman_settings: |
23 |
- if "HOME" in os.environ: |
24 |
- repoman_settings["PORTAGE_GPG_DIR"] = os.path.join(os.environ["HOME"], ".gnupg") |
25 |
- logging.info("Automatically setting PORTAGE_GPG_DIR to %s" % repoman_settings["PORTAGE_GPG_DIR"]) |
26 |
- else: |
27 |
- raise portage.exception.MissingParameter("PORTAGE_GPG_DIR is unset!") |
28 |
+ repoman_settings["PORTAGE_GPG_DIR"] = os.path.expanduser("~/.gnupg") |
29 |
+ logging.info("Automatically setting PORTAGE_GPG_DIR to %s" % repoman_settings["PORTAGE_GPG_DIR"]) |
30 |
repoman_settings["PORTAGE_GPG_DIR"] = os.path.expanduser(repoman_settings["PORTAGE_GPG_DIR"]) |
31 |
if not os.access(repoman_settings["PORTAGE_GPG_DIR"], os.X_OK): |
32 |
raise portage.exception.InvalidLocation( |