From 05ddd513c763a3dbfa338932925c608a2e836863 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Thu, 27 Nov 2025 18:05:36 +0100 Subject: [PATCH] libpmodules: substitute env-vars in Pmodules.yaml Subsitute environment variables if used in TmpDir and DistFilesDir in Pmodules.yaml. --- CHANGELOG.md | 2 ++ Pmodules/libpmodules.bash.in | 2 ++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3961cd5..9fccf4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ (#1316, #1331) ### build system +* Substitute environment variables in TmpDir and DistFilesDir in Pmodules.yaml + (#1333) * Function to simplify building modules with pip3 added. (#1329) * pbuild::install_docfiles() is now obsolete. If called it exists with diff --git a/Pmodules/libpmodules.bash.in b/Pmodules/libpmodules.bash.in index d6ea4ea..5ab0993 100644 --- a/Pmodules/libpmodules.bash.in +++ b/Pmodules/libpmodules.bash.in @@ -425,9 +425,11 @@ pm::read_config(){ ;; tmpdir | tmp_dir ) yml::get_value TmpDir yaml_input ".${key}" '!!str' + TmpDir="$(envsubst <<<"${TmpDir}")" ;; distfilesdir | download_dir ) yml::get_value DistfilesDir yaml_input ".${key}" '!!str' + DistfilesDir="$(envsubst <<<"${DistfilesDir}")" ;; overlays ) local -- overlay=''