summaryrefslogtreecommitdiff
path: root/bin/build-packages
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-11-09 20:08:53 +0100
committerErich Eckner <git@eckner.net>2018-11-09 20:08:53 +0100
commit8ec5c19f735a6968d83618d052e6a83ee6d696fd (patch)
treee28bcedfb8ec75aae4159769a46efd8a8349a8bc /bin/build-packages
parent15006d21f8407c22118a8dd7da6d9b383c37bed6 (diff)
downloadbuilder-8ec5c19f735a6968d83618d052e6a83ee6d696fd.tar.xz
bin/build-packages: more safety-checks when using :without_systemd_nspawn: - we now require "-p" and that the requested package was actually offered
Diffstat (limited to 'bin/build-packages')
-rwxr-xr-xbin/build-packages9
1 files changed, 9 insertions, 0 deletions
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'