Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-09-24 09:29:20 +0200
committerErich Eckner <git@eckner.net>2018-09-24 09:29:20 +0200
commitc3e4c542a81586cf7dc731a679d6caf904830278 (patch)
treeda1f441c6c261555429c2d821ea7b6a4dc5a5132
parentd033fbd631e5b9d3e99d9692ca2f3364da0d293e (diff)
bin/return-assignment: check that the packager is set
-rwxr-xr-xbin/return-assignment19
1 files changed, 17 insertions, 2 deletions
diff --git a/bin/return-assignment b/bin/return-assignment
index 45ff3d3..2fd533e 100755
--- a/bin/return-assignment
+++ b/bin/return-assignment
@@ -19,8 +19,6 @@
# TODO: sign database
-# TODO: check packager
-
# shellcheck disable=SC2119,SC2120
# shellcheck source=../lib/load-configuration
@@ -448,6 +446,23 @@ if [ -z "$(
exit 3
fi
+# check if the package maintainer is set
+errors=$(
+ find . -maxdepth 1 -name '*.pkg.tar.xz' | \
+ while read -r pkg; do
+ tar -OxJf "${pkg}" '.BUILDINFO' 2>/dev/null | \
+ grep -vxF 'packager = Unknown Packager' | \
+ grep -q '^packager = ' || \
+ printf '%s misses a valid packager.\n' \
+ "${pkg##*/}"
+ done
+)
+if [ -n "${errors}" ]; then
+ >&2 echo 'Packager error(s):'
+ >&2 printf '%s' "${errors}"
+ exit 3
+fi
+
# check if the sent packages are the expected ones
find . -maxdepth 1 -name '*.pkg.tar.xz' -printf '%f\n' > \
"${tmp_dir}/packages"