[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 | 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 -- 1.6.0.3
Allan McRae wrote:
Fixes a bug and resets pkgrel to 1 when bumping pkgver
Signed-off-by: Allan McRae <allan@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
participants (1)
-
Allan McRae