From 8ec5c19f735a6968d83618d052e6a83ee6d696fd Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 9 Nov 2018 20:08:53 +0100 Subject: bin/build-packages: more safety-checks when using :without_systemd_nspawn: - we now require "-p" and that the requested package was actually offered --- bin/build-packages | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'bin') diff --git a/bin/build-packages b/bin/build-packages index 0012020..e1dfbb5 100755 --- a/bin/build-packages +++ b/bin/build-packages @@ -439,6 +439,15 @@ while [ "${count}" -ne 0 ] && \ build_command='staging-with-build-support-'"${arch}"'-build' elif echo "${straw}" | \ grep -qF ':without_systemd_nspawn:'; then + if [ -z "${prefered_package}" ]; then + >&2 echo 'straw :without_systemd_nspawn: only allowed with -p' + exit 2 + fi + if [ "${prefered_package}" != "${package}" ]; then + >&2 echo 'The prefered package was not handed out.' + >&2 echo 'Because straw :without_systemd_nspawn: is active, I will abort.' + exit 2 + fi if ! uname -m | \ grep -qxF "${arch}"; then >&2 echo 'straw :without_systemd_nspawn: requires running build-packages on the' -- cgit v1.2.3-54-g00ecf