From: Daan De Meyer Date: Tue, 2 Jul 2024 09:19:17 +0000 (+0200) Subject: Pick up GNUPGHOME from user's environment X-Git-Tag: v24~72 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f07eb3bbe9b394fdc92186618d572ee1b983efb9;p=thirdparty%2Fmkosi.git Pick up GNUPGHOME from user's environment If not set in Environment=, we default to the user's home directory. Let's instead use GNUPGHOME from the user's environment if it is set before falling back to the user's home directory. Fixes #2815. --- diff --git a/mkosi/config.py b/mkosi/config.py index ad7a94ab8..cbfd373ed 100644 --- a/mkosi/config.py +++ b/mkosi/config.py @@ -3830,6 +3830,8 @@ def load_environment(args: argparse.Namespace) -> dict[str, str]: env["GIT_PROXY_SSL_KEY"] = "/proxy.clientkey" if dnf := os.getenv("MKOSI_DNF"): env["MKOSI_DNF"] = dnf + if gnupghome := os.getenv("GNUPGHOME"): + env["GNUPGHOME"] = gnupghome env |= dict(parse_environment(line) for f in args.environment_files for line in f.read_text().strip().splitlines()) env |= args.environment