From 6adf502f0d0e684c67d7498057083958becf8b19 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Sat, 24 Sep 2011 14:53:20 +1000 Subject: makepkg: allow versioned optdepends with epoch Allow the specification of versioned optdepends with an epoch. This also (partially) enforces a whitespace between ":" and the description which is required for the future optdepends parsing code. Signed-off-by: Allan McRae Signed-off-by: Dan McGee --- scripts/makepkg.sh.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 6304a258..a0b03753 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1529,8 +1529,8 @@ check_sanity() { eval $(awk '/^[[:space:]]*optdepends=\(/,/\)[[:space:]]*(#.*)?$/' "$BUILDFILE" | \ sed -e "s/optdepends=/optdepends_list+=/" -e "s/#.*//" -e 's/\\$//') for i in "${optdepends_list[@]}"; do - local pkg=${i%%:*} - if [[ $pkg != +([[:alnum:]><=.+_-]) ]]; then + local pkg=${i%%:[[:space:]]*} + if [[ $pkg != +([[:alnum:]><=.+_-:]) ]]; then error "$(gettext "Invalid syntax for %s : '%s'")" "optdepend" "$i" ret=1 fi -- cgit v1.2.3-24-g4f1b