Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts/libmakepkg
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2015-05-12 23:51:07 +1000
committerAllan McRae <allan@archlinux.org>2015-05-16 14:10:42 +1000
commitdbbe76b83d2dc1cac6f44c6d46d2f73ce14f01b5 (patch)
treed8a71b024e253cfe0269c3e7ab9fdf53f07eadef /scripts/libmakepkg
parent9302593cfb8a5a845dab501cfaef71ea5d54933a (diff)
makepkg: put further restrictions on pkgbase
pkgbase should be subject to the same restrictions as pkgname Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts/libmakepkg')
-rw-r--r--scripts/libmakepkg/lint_pkgbuild/pkgbase.sh.in9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/libmakepkg/lint_pkgbuild/pkgbase.sh.in b/scripts/libmakepkg/lint_pkgbuild/pkgbase.sh.in
index abb40e0c..0d4361cc 100644
--- a/scripts/libmakepkg/lint_pkgbuild/pkgbase.sh.in
+++ b/scripts/libmakepkg/lint_pkgbuild/pkgbase.sh.in
@@ -34,4 +34,13 @@ lint_pkgbase() {
error "$(gettext "%s is not allowed to start with a hyphen.")" "pkgname"
return 1
fi
+ if [[ ${pkgbase:0:1} = "." ]]; then
+ error "$(gettext "%s is not allowed to start with a dot.")" "pkgbase"
+ ret=1
+ fi
+ if [[ $pkgbase = *[^[:alnum:]+_.@-]* ]]; then
+ error "$(gettext "%s contains invalid characters: '%s'")" \
+ 'pkgbase' "${i//[[:alnum:]+_.@-]}"
+ ret=1
+ fi
}