From a28868eeae98b28c00f8112e8d81403ad21a3117 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Thu, 5 Aug 2010 21:37:22 +1000 Subject: makepkg: error out on empty optdepends entries If optdepends was defined with empty members, then makepkg would abort late in the package building process. Detect such cases in the check_sanity() function. Fix-provided-by: Andres P Signed-off-by: Allan McRae Signed-off-by: Dan McGee --- scripts/makepkg.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index eb3bd86d..272c3292 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1233,7 +1233,7 @@ check_sanity() { for i in "${optdepends[@]}"; do local pkg=${i%%:*} - if [[ ! $pkg =~ ^[[:alnum:]\>\<\=\.\+\_\-]*$ ]]; then + if [[ ! $pkg =~ ^[[:alnum:]\>\<\=\.\+\_\-]+$ ]]; then error "$(gettext "Invalid syntax for optdepend : '%s'")" "$i" fi done -- cgit v1.2.3-70-g09d2