summaryrefslogtreecommitdiff
path: root/commitpkg.in
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2012-04-11 15:11:23 +1000
committerPierre Schmitz <pierre@archlinux.de>2012-06-10 12:46:32 +0200
commitaddea828fef4f96d19752ff409445bff03e13610 (patch)
tree85493273ee4379f3181e26068f23cdfcf7e07f57 /commitpkg.in
parentacbbe8cb90ddf197451735b94107902887e0dcad (diff)
downloaddevtools-addea828fef4f96d19752ff409445bff03e13610.tar.xz
Prevent packages being uploaded with "Unknown Packager"
Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
Diffstat (limited to 'commitpkg.in')
-rw-r--r--commitpkg.in17
1 files changed, 17 insertions, 0 deletions
diff --git a/commitpkg.in b/commitpkg.in
index 2c1d95a..b5cf043 100644
--- a/commitpkg.in
+++ b/commitpkg.in
@@ -87,6 +87,23 @@ while getopts ':l:a:s:f' flag; do
done
shift $(( OPTIND - 1 ))
+# check packages have the packager field set
+for _arch in ${arch[@]}; do
+ if [[ -n $commit_arch && ${_arch} != "$commit_arch" ]]; then
+ continue
+ fi
+ for _pkgname in ${pkgname[@]}; do
+ fullver=$(get_full_version $_pkgname)
+
+ if pkgfile=$(shopt -s nullglob;
+ getpkgfile "${PKGDEST+$PKGDEST/}$_pkgname-$fullver-${_arch}".pkg.tar.?z); then
+ if grep -q "packager = Unknown Packager" <(bsdtar -xOqf $pkgfile .PKGINFO); then
+ die "PACKAGER was not set when building package"
+ fi
+ fi
+ done
+done
+
if [[ -z $server ]]; then
case "$repo" in
core|extra|testing|staging|kde-unstable|gnome-unstable)