diff options
author | Jonas Witschel <diabonas@archlinux.org> | 2019-10-02 16:40:56 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2019-10-04 03:48:51 +0200 |
commit | fd70c1c7bb0cb0681ab8a46d5f0494e0f9d992c6 (patch) | |
tree | 0d5708d53a01172703005e72dd5cc2a882321976 /scripts/libmakepkg/lint_config | |
parent | 6f3810793f4b1fc82094ccb1847ed82b85a203e6 (diff) | |
download | pacman-fd70c1c7bb0cb0681ab8a46d5f0494e0f9d992c6.tar.gz pacman-fd70c1c7bb0cb0681ab8a46d5f0494e0f9d992c6.tar.xz |
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>
Diffstat (limited to 'scripts/libmakepkg/lint_config')
-rw-r--r-- | scripts/libmakepkg/lint_config/variable.sh.in | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/libmakepkg/lint_config/variable.sh.in b/scripts/libmakepkg/lint_config/variable.sh.in index 55ed6d6d..b0b731dd 100644 --- a/scripts/libmakepkg/lint_config/variable.sh.in +++ b/scripts/libmakepkg/lint_config/variable.sh.in @@ -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 } |