Fix PORTAGE_GPG_DIR handling so that ~/.gnupg/ works correctly like the Manifest...
authorZac Medico <zmedico@gentoo.org>
Fri, 28 Apr 2006 23:22:44 +0000 (23:22 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 28 Apr 2006 23:22:44 +0000 (23:22 -0000)
svn path=/main/trunk/; revision=3262

bin/repoman

index 03bc5ee1f9941c1e9125c32f5f4e7c4cec3ddc9c..a6bbd8fa2abaf67557a28522c6e42b7f9d67d416 100755 (executable)
@@ -1582,6 +1582,10 @@ else:
                                        print "Automatically setting PORTAGE_GPG_DIR to",repoman_settings["PORTAGE_GPG_DIR"]
                        else:
                                raise portage_exception.MissingParameter("PORTAGE_GPG_DIR is unset!")
+               gpg_dir = repoman_settings["PORTAGE_GPG_DIR"]
+               if gpg_dir.startswith("~") and "HOME" in os.environ:
+                       repoman_settings["PORTAGE_GPG_DIR"] = os.path.join(
+                               os.environ["HOME"], gpg_dir[1:].lstrip(os.path.sep))
                if not os.access(repoman_settings["PORTAGE_GPG_DIR"], os.X_OK):
                        raise portage_exception.InvalidLocation(
                                "Unable to access directory: PORTAGE_GPG_DIR='%s'" % \