mirror of
https://github.com/moparisthebest/pacman
synced 2025-01-08 12:28:00 -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
|
||||
local pkg=${i%%:*}
|
||||
if [[ ! $pkg =~ ^[[:alnum:]\>\<\=\.\+\_\-]*$ ]]; then
|
||||
if [[ ! $pkg =~ ^[[:alnum:]\>\<\=\.\+\_\-]+$ ]]; then
|
||||
error "$(gettext "Invalid syntax for optdepend : '%s'")" "$i"
|
||||
fi
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user