Re: [pacman-dev] [PATCH] makepkg: don't warn when PACKAGER is unset

2019-10-22 Thread Allan McRae
On 22/10/19 8:39 pm, morganamilo wrote:
> makepkg now complains when PACKAGER is not in the format
> "name ".
> 
> Hide this warning when PACKAGER is unset but still warn if it is set to
> something out of format.
> 

That seems like a good exception to make.  Pulled to my queue.

Allan

> diff --git a/scripts/libmakepkg/lint_config/variable.sh.in 
> b/scripts/libmakepkg/lint_config/variable.sh.in
> index aa9f6c07..61ef4c09 100644
> --- a/scripts/libmakepkg/lint_config/variable.sh.in
> +++ b/scripts/libmakepkg/lint_config/variable.sh.in
> @@ -62,7 +62,7 @@ lint_config_variables() {
>  
>   # pacman should be able to extract an email address from PACKAGER for 
> WKD key lookup
>   local match='^([^<>]+ )?<[^<>]*>$'
> - if ! [[ $PACKAGER =~ $match ]]; then
> + if ! [[ $PACKAGER == "Unknown Packager" || $PACKAGER =~ $match ]]; then
>   warning "$(gettext "PACKAGER should have the format 'Example 
> Name '")"
>   fi
>  
> 


[pacman-dev] [PATCH] makepkg: don't warn when PACKAGER is unset

2019-10-22 Thread morganamilo
makepkg now complains when PACKAGER is not in the format
"name ".

Hide this warning when PACKAGER is unset but still warn if it is set to
something out of format.

diff --git a/scripts/libmakepkg/lint_config/variable.sh.in 
b/scripts/libmakepkg/lint_config/variable.sh.in
index aa9f6c07..61ef4c09 100644
--- a/scripts/libmakepkg/lint_config/variable.sh.in
+++ b/scripts/libmakepkg/lint_config/variable.sh.in
@@ -62,7 +62,7 @@ lint_config_variables() {
 
# pacman should be able to extract an email address from PACKAGER for 
WKD key lookup
local match='^([^<>]+ )?<[^<>]*>$'
-   if ! [[ $PACKAGER =~ $match ]]; then
+   if ! [[ $PACKAGER == "Unknown Packager" || $PACKAGER =~ $match ]]; then
warning "$(gettext "PACKAGER should have the format 'Example 
Name '")"
fi
 
-- 
2.23.0