mirror of
https://github.com/moparisthebest/pacman
synced 2025-01-08 12:28:00 -05:00
makepkg: extend test for hyphen prefixes to pkgbase and all pkgnames
Since commit fb97d32
, which brought in this test, support for split
PKGBUILDs was added, and therefore, all values of pkgname and also
pkgbase have to be checked now.
Signed-off-by: Cedric Staniewski <cedric@gmx.ca>
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
9c34dfd908
commit
564352c4a2
@ -1140,8 +1140,17 @@ check_sanity() {
|
||||
error "$(gettext "%s is not allowed to be empty.")" "pkgrel"
|
||||
return 1
|
||||
fi
|
||||
if [[ ${pkgname:0:1} == "-" ]]; then
|
||||
error "$(gettext "%s is not allowed to start with a hyphen.")" "pkgname"
|
||||
|
||||
local name
|
||||
for name in "${pkgname[@]}"; do
|
||||
if [[ ${name:0:1} = "-" ]]; then
|
||||
error "$(gettext "%s is not allowed to start with a hyphen.")" "pkgname"
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ ${pkgbase:0:1} = "-" ]]; then
|
||||
error "$(gettext "%s is not allowed to start with a hyphen.")" "pkgbase"
|
||||
return 1
|
||||
fi
|
||||
if [[ $pkgver != ${pkgver//-/} ]]; then
|
||||
|
Loading…
Reference in New Issue
Block a user