Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts/libmakepkg/lint_config
diff options
context:
space:
mode:
authorJonas Witschel <diabonas@archlinux.org>2019-10-02 16:40:56 +0200
committerAllan McRae <allan@archlinux.org>2019-10-04 11:48:51 +1000
commitfd70c1c7bb0cb0681ab8a46d5f0494e0f9d992c6 (patch)
tree0d5708d53a01172703005e72dd5cc2a882321976 /scripts/libmakepkg/lint_config
parent6f3810793f4b1fc82094ccb1847ed82b85a203e6 (diff)
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.in6
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
}