Merge "Catch errors in DIB_INIT_SYSTEM export"

This commit is contained in:
Jenkins 2016-12-14 07:14:10 +00:00 committed by Gerrit Code Review
commit d1ca1b1957
3 changed files with 13 additions and 2 deletions

View File

@ -167,6 +167,15 @@ for i in $(find elements -type f \
fi
fi
# check for
# export FOO=$(bar)
# calls. These are dangerous, because the export hides the return
# code of the $(bar) call. Split this into 2 lines and -e will
# fail on the assignment
if grep -q 'export .*\$(' $i; then
error "Split export and assignments in $i"
fi
# check that sudo calls in phases run outside the chroot look
# "safe"; meaning that they seem to operate within the chroot
# somehow. This is not fool-proof, but catches egregious errors,

View File

@ -1 +1,2 @@
export DIB_APT_SOURCES=$(mktemp)
DIB_APT_SOURCES=$(mktemp)
export DIB_APT_SOURCES

View File

@ -1 +1,2 @@
export DIB_INIT_SYSTEM=$(PATH="$PATH:$(dirname $BASH_SOURCE)/.." dib-init-system)
DIB_INIT_SYSTEM=$(PATH="$PATH:$(dirname $BASH_SOURCE)/.." dib-init-system)
export DIB_INIT_SYSTEM