[pacman-dev] [PATCH] makepkg: fix updating PKGBUILD when building SCM packages
Allan McRae
allan at archlinux.org
Tue Oct 28 07:27:21 EDT 2008
Fixes a bug and resets pkgrel to 1 when bumping pkgver
Signed-off-by: Allan McRae <allan at 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
More information about the pacman-dev
mailing list