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
1 changed files with 2 additions and 2 deletions
|
@ -1529,8 +1529,8 @@ check_sanity() {
|
||||||
eval $(awk '/^[[:space:]]*optdepends=\(/,/\)[[:space:]]*(#.*)?$/' "$BUILDFILE" | \
|
eval $(awk '/^[[:space:]]*optdepends=\(/,/\)[[:space:]]*(#.*)?$/' "$BUILDFILE" | \
|
||||||
sed -e "s/optdepends=/optdepends_list+=/" -e "s/#.*//" -e 's/\\$//')
|
sed -e "s/optdepends=/optdepends_list+=/" -e "s/#.*//" -e 's/\\$//')
|
||||||
for i in "${optdepends_list[@]}"; do
|
for i in "${optdepends_list[@]}"; do
|
||||||
local pkg=${i%%:*}
|
local pkg=${i%%:[[:space:]]*}
|
||||||
if [[ $pkg != +([[:alnum:]><=.+_-]) ]]; then
|
if [[ $pkg != +([[:alnum:]><=.+_-:]) ]]; then
|
||||||
error "$(gettext "Invalid syntax for %s : '%s'")" "optdepend" "$i"
|
error "$(gettext "Invalid syntax for %s : '%s'")" "optdepend" "$i"
|
||||||
ret=1
|
ret=1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue