libmakepkg: check if PACKAGER has the expected format for WKD lookup
pacman should be able to extract an email address from PACKAGER for WKD lookup, so issue a warning if it is not of the form "Example Name <email@address.invalid>". Neither the name nor the email address must contain additional angle brackets. Signed-off-by: Jonas Witschel <diabonas@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
6f3810793f
commit
fd70c1c7bb
1 changed files with 6 additions and 0 deletions
|
@ -60,5 +60,11 @@ lint_config_variables() {
|
|||
fi
|
||||
done
|
||||
|
||||
# pacman should be able to extract an email address from PACKAGER for WKD key lookup
|
||||
local match='^([^<>]+ )?<[^<>]*>$'
|
||||
if ! [[ $PACKAGER =~ $match ]]; then
|
||||
warning "$(gettext "PACKAGER should have the format 'Example Name <email@address.invalid>'")"
|
||||
fi
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue