mirror of
https://github.com/moparisthebest/pacman
synced 2025-01-09 04:57:59 -05:00
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
@ -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…
Reference in New Issue
Block a user