On 14/12/12 01:29, William Giokas wrote:
> When building sources that have a pkgver() function, makepkg prints:
>   ==> Making package: $pkgname $pkgver-$pkgrel $(date)
> which, normally, works out fine. Only problem is using vcs sources with
> a pkgver() function, it will print out the old version. So, if there is
> an update, the user won't know what version the package changed to till
> after the build. This patch adds in a line that prints out
>   ==> Updated version: $pkgbase $newversion-1
> if the version has changed.
> 
> $newversion includes epoch and since an update automatically resets the
> release number to 1, that is printed as well.
> 
> Signed-off-by: William Giokas <[email protected]>
> ---
>  scripts/makepkg.sh.in | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
> index d34261b..678ceb1 100644
> --- a/scripts/makepkg.sh.in
> +++ b/scripts/makepkg.sh.in
> @@ -699,11 +699,8 @@ update_pkgver() {
>               if [[ -f $BUILDFILE && -w $BUILDFILE ]]; then
>                       @SEDINPLACE@ "s/^pkgver=[^ ]*/pkgver=$newpkgver/" 
> "$BUILDFILE"
>                       @SEDINPLACE@ "s/^pkgrel=[^ ]*/pkgrel=1/" "$BUILDFILE"
> -                     if [[ -n "$pkgver" ]]; then
> -                             msg "$(gettext "Updated version: %s-%s to 
> %s-1")" $pkgver $pkgrel $newpkgver
> -                     else
> -                             msg "$(gettext "Updated version to %s-1")" 
> $newpkgver
> -                     fi
> +                     local fullver=$(get_full_version)
> +                     msg "$(gettext "Updated version: %s-1")" "$pkgbase 
> $fullver"
>                       source "$BUILDFILE"

1. this seems to be a patch on top of your old patch
2. fullver will be the old version unless it is done AFTER the source line
3. get_full_version has the pkgrel, so no need for that.
4. with all the changes your patch description does not match the patch

>               else
>                       warning "$(gettext "%s is not writeable -- pkgver will 
> not be updated")" \
> 


Reply via email to