mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 15:58:50 -05:00
makepkg: ensure '-' is last in a character glob
If '-' isn't the last item, it's interpreted as a range and not literally, causing problematic behavior in parsing optdepends. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
This commit is contained in:
parent
e70d540501
commit
619c3629ca
@ -1530,7 +1530,8 @@ check_sanity() {
|
||||
sed -e "s/optdepends=/optdepends_list+=/" -e "s/#.*//" -e 's/\\$//')
|
||||
for i in "${optdepends_list[@]}"; do
|
||||
local pkg=${i%%:[[:space:]]*}
|
||||
if [[ $pkg != +([[:alnum:]><=.+_-:]) ]]; then
|
||||
# the '-' character _must_ be first or last in the character range
|
||||
if [[ $pkg != +([-[:alnum:]><=.+_:]) ]]; then
|
||||
error "$(gettext "Invalid syntax for %s : '%s'")" "optdepend" "$i"
|
||||
ret=1
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user