mirror of
https://github.com/moparisthebest/pacman
synced 2025-03-01 01:41:52 -05:00
makepkg: enforce decimal format for pkgrel
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
This commit is contained in:
parent
82abe079ab
commit
708a227578
@ -1481,8 +1481,8 @@ check_sanity() {
|
||||
awk -F'=' '$1 ~ /^[[:space:]]*pkgrel$/' "$BUILDFILE" | sed "s/[[:space:]]*#.*//" |
|
||||
while IFS='=' read -r _ i; do
|
||||
eval i=\"$(sed 's/^\(['\''"]\)\(.*\)\1$/\2/' <<< "${i%%+([[:space:]])}")\"
|
||||
if [[ $i = *[[:space:]-]* ]]; then
|
||||
error "$(gettext "%s is not allowed to contain hyphens or whitespace.")" "pkgrel"
|
||||
if [[ $i != +([0-9])?(.+([0-9])) ]]; then
|
||||
error "$(gettext "%s must be a decimal.")" "pkgrel"
|
||||
return 1
|
||||
fi
|
||||
done || ret=1
|
||||
|
Loading…
x
Reference in New Issue
Block a user