makepkg: do not update pkgver when building source package

When making a source package for a SCM PKGBUILD, makepkg should not
update the pkgver/pkgrel.  Noted in FS#14456.

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Allan McRae 2009-04-26 19:52:29 +10:00
parent 20017354f7
commit de44a0f474
1 changed files with 5 additions and 6 deletions

View File

@ -1100,14 +1100,13 @@ install_package() {
devel_check() {
newpkgver=""
# Only update pkgver if --holdver is not set
if [ "$HOLDVER" -eq 1 ]; then
return
fi
# Cannot update pkgver/pkgrel if reading PKGBUILD from pipe
if [ ! -f "./$BUILDSCRIPT" ]; then
# Do not update pkgver if --holdver is set, when building a source package,
# or when reading PKGBUILD from pipe
if [ "$HOLDVER" -eq 1 -o "$SOURCEONLY" -ne 0 -o ! -f "./$BUILDSCRIPT" ]; then
return
fi
if [ -z "$FORCE_VER" ]; then
# Check if this is a svn/cvs/etc PKGBUILD; set $newpkgver if so.
# This will only be used on the first call to makepkg; subsequent