From b652350522ec5c7402c4cb9b610cb405b732763e Mon Sep 17 00:00:00 2001 From: Michael Olbrich Date: Wed, 3 Oct 2018 13:27:42 +0200 Subject: ptxdist: make sure PTXDIST_PTXCONFIG/PTXDIST_PLATFORMCONFIG are never empty Before the introduction of layers, these variables referred to the nonexistent selected_* link if no config was selected of found. The corresponding error handling rely on the behaviour. Restore this behaviour to get the correct error message. Signed-off-by: Michael Olbrich --- bin/ptxdist | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bin') diff --git a/bin/ptxdist b/bin/ptxdist index d0d381481..fd3258a49 100755 --- a/bin/ptxdist +++ b/bin/ptxdist @@ -1359,6 +1359,7 @@ setup_layers() if [ "${PTX_ptxconfig_SET}" = "false" ]; then local -a cfgs=( "selected_ptxconfig" "configs/ptxconfig" ) + PTXDIST_PTXCONFIG="${PTXDIST_LAYERS[0]}/${cfgs[0]}" for layer in "${PTXDIST_LAYERS[@]}"; do local -a ptxd_reply ptxd_get_path "${cfgs[@]/#/${layer}/}" || continue @@ -1369,6 +1370,7 @@ setup_layers() if [ "${PTX_platformconfig_SET}" = "false" ]; then local -a cfgs=( "selected_platformconfig" "configs/*/platformconfig" ) + PTXDIST_PLATFORMCONFIG="${PTXDIST_LAYERS[0]}/${cfgs[0]}" for layer in "${PTXDIST_LAYERS[@]}"; do local tmp=( ${cfgs[@]/#/${layer}/} ) if [ "${#tmp[@]}" -gt 2 ]; then -- cgit v1.2.3