summaryrefslogtreecommitdiffstats
path: root/scripts/makepkg.sh.in
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2010-08-05 13:37:22 +0200
committerDan McGee <dan@archlinux.org>2010-08-24 04:51:45 +0200
commita28868eeae98b28c00f8112e8d81403ad21a3117 (patch)
tree08c9140f1b124dffb5684fc5807cb4c76ee70f88 /scripts/makepkg.sh.in
parent08e1d4764cdc7f62b11be4b411071b6a87118c93 (diff)
downloadpacman-a28868eeae98b28c00f8112e8d81403ad21a3117.tar.gz
pacman-a28868eeae98b28c00f8112e8d81403ad21a3117.tar.xz
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 <aepd87@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'scripts/makepkg.sh.in')
-rw-r--r--scripts/makepkg.sh.in2
1 files changed, 1 insertions, 1 deletions
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