mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-23 08:18:51 -05:00
makepkg: enable passing PKGBUILD from pipe
Do not attemp to update pkgver/pkgrel when reading a SCM based PKGBUILD from a pipe. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
cd51abf0c8
commit
8d33dcb81c
@ -1037,6 +1037,10 @@ devel_check() {
|
||||
if [ "$HOLDVER" = "1" ]; then
|
||||
return
|
||||
fi
|
||||
# Cannot update pkgver/pkgrel if reading PKGBUILD from pipe
|
||||
if [ ! -f "./$BUILDSCRIPT" ]; then
|
||||
return
|
||||
fi
|
||||
if [ "$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
|
||||
@ -1104,9 +1108,11 @@ devel_update() {
|
||||
#
|
||||
if [ "$newpkgver" != "" ]; then
|
||||
if [ "$newpkgver" != "$pkgver" ]; then
|
||||
sed -i "s/^pkgver=[^ ]*/pkgver=$newpkgver/" ./$BUILDSCRIPT
|
||||
sed -i "s/^pkgrel=[^ ]*/pkgrel=1/" ./$BUILDSCRIPT
|
||||
source $BUILDSCRIPT
|
||||
if [ -f "./$BUILDSCRIPT" ]; then
|
||||
sed -i "s/^pkgver=[^ ]*/pkgver=$newpkgver/" ./$BUILDSCRIPT
|
||||
sed -i "s/^pkgrel=[^ ]*/pkgrel=1/" ./$BUILDSCRIPT
|
||||
source $BUILDSCRIPT
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user