[pacman-dev] [PATCH] makepkg: fix updating PKGBUILD when building SCM packages

Allan McRae allan at archlinux.org
Tue Oct 28 07:39:29 EDT 2008


Allan McRae wrote:
> Fixes a bug and resets pkgrel to 1 when bumping pkgver
>
> Signed-off-by: Allan McRae <allan at archlinux.org>
> ---
>  scripts/makepkg.sh.in |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
> index 5735891..e8add36 100644
> --- a/scripts/makepkg.sh.in
> +++ b/scripts/makepkg.sh.in
> @@ -1113,8 +1113,9 @@ devel_update() {
>  	#  _foo=pkgver
>  	#
>  	if [ "$newpkgver" != "" ]; then
> -		if [ "newpkgver" != "$pkgver" ]; then
> +		if [ "$newpkgver" != "$pkgver" ]; then
>  			sed -i "s/^pkgver=[^ ]*/pkgver=$newpkgver/" ./$BUILDSCRIPT
> +			sed -i "s/^pkgrel=[^ ]*/pkgrel=1/" ./$BUILDSCRIPT
>  			source $BUILDSCRIPT
>  		fi
>  	fi
>   

I have noticed that makepkg still prints out the old pkgrel at the start 
and the end so I need to fix that too...

Allan





More information about the pacman-dev mailing list