[pacman-dev] [PATCHv2] [makepkg] Print out new version on change

Allan McRae allan at archlinux.org
Wed Dec 5 23:36:17 EST 2012


On 06/12/12 14:01, 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 from $oldversion to $newversion
> if the version has changed.
> 
> Signed-off-by: William Giokas <1007380 at gmail.com>
> ---
>  scripts/makepkg.sh.in | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
> index 2fe6605..5f2997b 100644
> --- a/scripts/makepkg.sh.in
> +++ b/scripts/makepkg.sh.in
> @@ -699,6 +699,7 @@ update_pkgver() {
>  		if [[ -f $BUILDFILE && -w $BUILDFILE ]]; then
>  			@SEDINPLACE@ "s/^pkgver=[^ ]*/pkgver=$newpkgver/" "$BUILDFILE"
>  			@SEDINPLACE@ "s/^pkgrel=[^ ]*/pkgrel=1/" "$BUILDFILE"
> +			msg "$(gettext "Updated version %s to %s")" $pkgver $newpkgver

I'll go for a v3 here!
msg "$(gettext "Updated version: %s to %s")" $pkgver $newpkgver

Also we want to mention pkgrel here?

msg "$(gettext "Updated version: %s-%s to %s-1")" $pkgver $pkgrel $newpkgver


Either way, I can make the change when I pull it into my working tree.

Allan


More information about the pacman-dev mailing list