mirror of
https://github.com/moparisthebest/pacman
synced 2025-01-11 05:48:09 -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
|
if [ "$HOLDVER" = "1" ]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
# Cannot update pkgver/pkgrel if reading PKGBUILD from pipe
|
||||||
|
if [ ! -f "./$BUILDSCRIPT" ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
if [ "$FORCE_VER" = "" ]; then
|
if [ "$FORCE_VER" = "" ]; then
|
||||||
# Check if this is a svn/cvs/etc PKGBUILD; set $newpkgver if so.
|
# 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
|
# This will only be used on the first call to makepkg; subsequent
|
||||||
@ -1104,9 +1108,11 @@ devel_update() {
|
|||||||
#
|
#
|
||||||
if [ "$newpkgver" != "" ]; then
|
if [ "$newpkgver" != "" ]; then
|
||||||
if [ "$newpkgver" != "$pkgver" ]; then
|
if [ "$newpkgver" != "$pkgver" ]; then
|
||||||
sed -i "s/^pkgver=[^ ]*/pkgver=$newpkgver/" ./$BUILDSCRIPT
|
if [ -f "./$BUILDSCRIPT" ]; then
|
||||||
sed -i "s/^pkgrel=[^ ]*/pkgrel=1/" ./$BUILDSCRIPT
|
sed -i "s/^pkgver=[^ ]*/pkgver=$newpkgver/" ./$BUILDSCRIPT
|
||||||
source $BUILDSCRIPT
|
sed -i "s/^pkgrel=[^ ]*/pkgrel=1/" ./$BUILDSCRIPT
|
||||||
|
source $BUILDSCRIPT
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user