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"
                else
                        warning "$(gettext "%s is not writeable -- pkgver will 
not be updated")" \
-- 
1.8.1.rc1.20.g24a62db


Reply via email to