[pacman-dev] [PATCH] makepkg: fix updating PKGBUILD when building SCM packages
Fixes a bug and resets pkgrel to 1 when bumping pkgver Signed-off-by: Allan McRae <allan@archlinux.org> --- scripts/makepkg.sh.in | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 5735891..52784b6 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1094,6 +1094,7 @@ devel_check() { if [ "$newpkgver" != "" ]; then msg2 "$(gettext "Version found: %s")" "$newpkgver" pkgver=$newpkgver + pkgrel=1 fi else @@ -1113,8 +1114,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 -- 1.6.0.3
On Tue, Oct 28, 2008 at 6:48 AM, Allan McRae <allan@archlinux.org> wrote:
Fixes a bug and resets pkgrel to 1 when bumping pkgver
Thanks, applied. -Dan
participants (2)
-
Allan McRae
-
Dan McGee