Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-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"