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>
This commit is contained in:
parent
08e1d4764c
commit
a28868eeae
1 changed files with 1 additions and 1 deletions
|
@ -1233,7 +1233,7 @@ check_sanity() {
|
||||||
|
|
||||||
for i in "${optdepends[@]}"; do
|
for i in "${optdepends[@]}"; do
|
||||||
local pkg=${i%%:*}
|
local pkg=${i%%:*}
|
||||||
if [[ ! $pkg =~ ^[[:alnum:]\>\<\=\.\+\_\-]*$ ]]; then
|
if [[ ! $pkg =~ ^[[:alnum:]\>\<\=\.\+\_\-]+$ ]]; then
|
||||||
error "$(gettext "Invalid syntax for optdepend : '%s'")" "$i"
|
error "$(gettext "Invalid syntax for optdepend : '%s'")" "$i"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Add table
Reference in a new issue