summaryrefslogtreecommitdiff
path: root/bin/build-packages
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-04-17 14:04:02 +0200
committerErich Eckner <git@eckner.net>2019-04-17 14:04:02 +0200
commitb6568d37c8be310b5a4821e0c1505635542b0b94 (patch)
tree65120d4abc5d864c5cb0eb1f05c293890af47554 /bin/build-packages
parent48a84a2ca7bf680fde1975fe87262d3fea6b1da3 (diff)
downloadbuilder-b6568d37c8be310b5a4821e0c1505635542b0b94.tar.xz
bin/build-packages: -d should require, that the given package is indeed the prefered one
Diffstat (limited to 'bin/build-packages')
-rwxr-xr-xbin/build-packages13
1 files changed, 13 insertions, 0 deletions
diff --git a/bin/build-packages b/bin/build-packages
index d2c3f3a..e2a972d 100755
--- a/bin/build-packages
+++ b/bin/build-packages
@@ -268,6 +268,19 @@ while [ "${count}" -ne 0 ] && \
arch="${my_arch}"
fi
+ if [ -n "${diff_source_dir}" ] &&
+ [ "${prefered_package}" != "${package}" ]; then
+ >&2 echo 'The prefered package was not handed out.'
+ >&2 echo 'Because -d was given, I will abort.'
+ # shellcheck disable=SC2029
+ ssh \
+ -i "${master_build_server_identity}" \
+ -p "${master_build_server_port}" \
+ "${master_build_server_user}@${master_build_server}" \
+ 'return-assignment' 'ABORT'
+ exit 2
+ fi
+
if [ -z "${forced_straws}" ] && \
printf '%s\n' "${package}" | \
grep -q '^\(haskell\|python2\?\)-'; then