diff options
author | Allan McRae <allan@archlinux.org> | 2010-08-05 21:37:22 +1000 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-08-23 21:51:45 -0500 |
commit | a28868eeae98b28c00f8112e8d81403ad21a3117 (patch) | |
tree | 08c9140f1b124dffb5684fc5807cb4c76ee70f88 | |
parent | 08e1d4764cdc7f62b11be4b411071b6a87118c93 (diff) |
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>
-rw-r--r-- | scripts/makepkg.sh.in | 2 |
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 |