[pacman-dev,v2,2/3] makepkg: check_pkgrel: Don't say "decimal" in the error message

Message ID 20180809174114.29405-3-lukeshu@lukeshu.com
State Accepted, archived
Headers show
Series
  • makepkg: Improve lint_pkgbuild error messages for epoch/ver/rel
Related show

Commit Message

Luke Shumaker Aug. 9, 2018, 5:41 p.m. UTC
From: Luke Shumaker <lukeshu@parabola.nu>

If you have a malformed pkgrel, the error message says that it must be a
"decimal".  That isn't quite true, as that would mean that `1.1 == 1.10`.
---
 scripts/libmakepkg/lint_pkgbuild/pkgrel.sh.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Allan McRae Jan. 10, 2019, 5:58 a.m. UTC | #1
On 10/8/18 3:41 am, Luke Shumaker wrote:
> From: Luke Shumaker <lukeshu@parabola.nu>
> 
> If you have a malformed pkgrel, the error message says that it must be a
> "decimal".  That isn't quite true, as that would mean that `1.1 == 1.10`.
> ---
>  scripts/libmakepkg/lint_pkgbuild/pkgrel.sh.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/libmakepkg/lint_pkgbuild/pkgrel.sh.in b/scripts/libmakepkg/lint_pkgbuild/pkgrel.sh.in
> index 5dc9d3a7..cc2c0f40 100644
> --- a/scripts/libmakepkg/lint_pkgbuild/pkgrel.sh.in
> +++ b/scripts/libmakepkg/lint_pkgbuild/pkgrel.sh.in
> @@ -37,7 +37,7 @@ check_pkgrel() {
>  	fi
>  
>  	if [[ $rel != +([0-9])?(.+([0-9])) ]]; then
> -		error "$(gettext "%s must be a decimal, not %s.")" "pkgrel${type:+ in $type}" "$rel"
> +		error "$(gettext "%s must be of the form 'integer[.integer]', not %s.")" "pkgrel${type:+ in $type}" "$rel"
>  		return 1
>  	fi
>  }
> 

Thanks,
A

Patch

diff --git a/scripts/libmakepkg/lint_pkgbuild/pkgrel.sh.in b/scripts/libmakepkg/lint_pkgbuild/pkgrel.sh.in
index 5dc9d3a7..cc2c0f40 100644
--- a/scripts/libmakepkg/lint_pkgbuild/pkgrel.sh.in
+++ b/scripts/libmakepkg/lint_pkgbuild/pkgrel.sh.in
@@ -37,7 +37,7 @@  check_pkgrel() {
 	fi
 
 	if [[ $rel != +([0-9])?(.+([0-9])) ]]; then
-		error "$(gettext "%s must be a decimal, not %s.")" "pkgrel${type:+ in $type}" "$rel"
+		error "$(gettext "%s must be of the form 'integer[.integer]', not %s.")" "pkgrel${type:+ in $type}" "$rel"
 		return 1
 	fi
 }