[pacman-dev] [PATCH] makepkg: pkgver and pkgrel can not have whitespace
Dave Reisner
d at falconindy.com
Fri Jul 22 10:07:50 EDT 2011
On Fri, Jul 22, 2011 at 10:02:56PM +1000, Allan McRae wrote:
> There is always someone who tries to break things (cough *Dave* cough...)
Just doin' my job.
http://knowyourmeme.com/i/000/044/778/original/hatersgonnacat.jpg
> Signed-off-by: Allan McRae <allan at archlinux.org>
> ---
> scripts/makepkg.sh.in | 10 ++++++----
> 1 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
> index 0682e4f..ec5b388 100644
> --- a/scripts/makepkg.sh.in
> +++ b/scripts/makepkg.sh.in
> @@ -1438,12 +1438,14 @@ check_sanity() {
> error "$(gettext "%s is not allowed to start with a hyphen.")" "pkgbase"
> ret=1
> fi
> - if [[ $pkgver =~ [:-] ]]; then
> - error "$(gettext "%s is not allowed to contain colons or hyphens.")" "pkgver"
> +
> + if [[ $pkgver =~ [[:space:]:-] ]]; then
> + error "$(gettext "%s is not allowed to contain colons, hyphens or whitespace.")" "pkgver"
> ret=1
> fi
> - if [[ $pkgrel != ${pkgrel//-/} ]]; then
> - error "$(gettext "%s is not allowed to contain hyphens.")" "pkgrel"
> +
> + if [[ $pkgrel =~ [[:space:]-] ]]; then
> + error "$(gettext "%s is not allowed to contain hyphens or whitespace.")" "pkgrel"
> ret=1
> fi
>
> --
> 1.7.6
>
>
More information about the pacman-dev
mailing list