makepkg: allow versioned optdepends with epoch
Allow the specification of versioned optdepends with an epoch. This also (partially) enforces a whitespace between ":" and the description which is required for the future optdepends parsing code. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
d26d50e664
commit
6adf502f0d
|
@ -1529,8 +1529,8 @@ check_sanity() {
|
|||
eval $(awk '/^[[:space:]]*optdepends=\(/,/\)[[:space:]]*(#.*)?$/' "$BUILDFILE" | \
|
||||
sed -e "s/optdepends=/optdepends_list+=/" -e "s/#.*//" -e 's/\\$//')
|
||||
for i in "${optdepends_list[@]}"; do
|
||||
local pkg=${i%%:*}
|
||||
if [[ $pkg != +([[:alnum:]><=.+_-]) ]]; then
|
||||
local pkg=${i%%:[[:space:]]*}
|
||||
if [[ $pkg != +([[:alnum:]><=.+_-:]) ]]; then
|
||||
error "$(gettext "Invalid syntax for %s : '%s'")" "optdepend" "$i"
|
||||
ret=1
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue