From 619c3629ca61cea2c182fcb0197f9b84ba4209c3 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Tue, 27 Sep 2011 11:27:54 -0400 Subject: 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 --- scripts/makepkg.sh.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 2703177b..86e74a68 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -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 -- cgit v1.2.3-70-g09d2