diff --git a/dkbuild b/dkbuild index 72ccfb9..bcfc069 100755 --- a/dkbuild +++ b/dkbuild @@ -1603,6 +1603,10 @@ function resolve_dists_profiles() { edebug "Calcul de la version par défaut" reset_functions define_functions_env + + setenv "${TMPENVIRON[@]}" + setarg "${TMPARGS[@]}" + setarg "$@" load_dkbuild } @@ -2973,10 +2977,7 @@ function build_action() { set_machine "$machine" ensure_projdir - resolve_dists_profiles - setenv "${TMPENVIRON[@]}" - setarg "${TMPARGS[@]}" - setarg "$@" + resolve_dists_profiles "$@" if [ -n "$clean_update" ]; then edebug "clean" @@ -3145,10 +3146,7 @@ function dump_action() { set_machine "$machine" ensure_projdir - resolve_dists_profiles - setenv "${TMPENVIRON[@]}" - setarg "${TMPARGS[@]}" - setarg "$@" + resolve_dists_profiles "$@" foreach_dists_profiles _dump_each _dump_before _dump_after } diff --git a/lib/dkbuild/tests/test-vars b/lib/dkbuild/tests/test-vars0 similarity index 83% rename from lib/dkbuild/tests/test-vars rename to lib/dkbuild/tests/test-vars0 index 8ac58fe..f766e20 100644 --- a/lib/dkbuild/tests/test-vars +++ b/lib/dkbuild/tests/test-vars0 @@ -8,7 +8,7 @@ info "A=$A, B=$B" if [ "$A" != x ]; then note "\ Essayer de relancer avec - $(qvals dkbuild -j "$(relpath "$DKBUILD")" -e A=x -e B=y) + $(qvals "$0" -j "$(relpath "$DKBUILD")" -e A=x -e B=y) on ne devrait pas pouvoir modifier la valeur de B" fi diff --git a/lib/dkbuild/tests/test-vars1 b/lib/dkbuild/tests/test-vars1 new file mode 100644 index 0000000..1cf5599 --- /dev/null +++ b/lib/dkbuild/tests/test-vars1 @@ -0,0 +1,15 @@ +# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8 + +setenv dne=1 +setenv de= + +info "dne=$dne de=$de" +if [ -n "$dne" -o -z "$de" ]; then + note "\ +Relancer avec + $(qvals "$0" -j "$(relpath "$DKBUILD")" -e dne= -e de=1) +pour vérifier qu'on peut changer la valeur avec les options en ligne de commande" +fi + +# pas de build automatique +AUTOBUILD=