Vesa Kaihlavirta wrote:
From: Vesa Kaihlavirta <vegai@iki.fi>
Signed-off-by: Vesa Kaihlavirta <vegai@iki.fi> --- scripts/makepkg.sh.in | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 5bbd880..78b1e22 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -44,7 +44,7 @@ startdir="$PWD" srcdir="$startdir/src" pkgdir="$startdir/pkg"
-packaging_options=('strip' 'docs' 'libtool' 'emptydirs' 'zipman' 'purge') +packaging_options=('strip' 'docs' 'libtool' 'emptydirs' 'zipman' 'holdver' 'purge') other_options=('ccache' 'distcc' 'makeflags' 'force') splitpkg_overrides=('pkgver' 'pkgrel' 'pkgdesc' 'arch' 'license' 'groups' \ 'depends' 'optdepends' 'provides' 'conflicts' 'replaces' \ @@ -1269,12 +1269,13 @@ check_sanity() { devel_check() { newpkgver=""
- # Do not update pkgver if --holdver is set, when building a source package, repackaging, - # reading PKGBUILD from pipe (-f), or if we cannot write to the file (-w) - if (( HOLDVER || SOURCEONLY || REPKG )) \ - || [[ ! -f $BUILDFILE || ! -w $BUILDFILE ]]; then - return - fi + # Do not update pkgver if --holdver is set, holdver option is set, when building a + # source package, when reading PKGBUILD from pipe (-f), or if we cannot write to the file (-w) + if [ "$HOLDVER" -eq 1 -o "$(check_option holdver)" = "y" \ + -o "$SOURCEONLY" -ne 0 -o ! -f "$BUILDFILE" \ + -o ! -w "$BUILDFILE" ]; then + return + fi
if [[ -z $FORCE_VER ]]; then # Check if this is a svn/cvs/etc PKGBUILD; set $newpkgver if so.
Why is this useful? I see that you can either you use the --holdver flag or you check out a specific revision in the PKGBUILD. Allan