From 9de33488bffffd4bb273f73f98a0ced40ba06f29 Mon Sep 17 00:00:00 2001 From: Eric Bélanger Date: Sun, 28 Apr 2013 22:42:22 -0400 Subject: Add --noprepare option to makepkg MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This new option disables the prepare function. Useful in combination with -o to get an unpatched copy of the sources for testing purpose. Signed-off-by: Eric Bélanger Signed-off-by: Allan McRae --- scripts/makepkg.sh.in | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 1bc93519..edfca3cb 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -2483,6 +2483,7 @@ usage() { printf -- "$(gettext " --holdver Do not update VCS sources")\n" printf -- "$(gettext " --key Specify a key to use for %s signing instead of the default")\n" "gpg" printf -- "$(gettext " --nocheck Do not run the %s function in the %s")\n" "check()" "$BUILDSCRIPT" + printf -- "$(gettext " --noprepare Do not run the %s function in the %s")\n" "prepare()" "$BUILDSCRIPT" printf -- "$(gettext " --nosign Do not create a signature for the package")\n" printf -- "$(gettext " --pkg Only build listed packages from a split package")\n" printf -- "$(gettext " --sign Sign the resulting package with %s")\n" "gpg" @@ -2525,7 +2526,7 @@ ARGLIST=("$@") OPT_SHORT="AcdefFghiLmop:rRsSV" OPT_LONG=('allsource' 'asroot' 'check' 'clean' 'config:' 'force' 'geninteg' 'help' 'holdver' 'ignorearch' 'install' 'key:' 'log' 'nobuild' 'nocolor' - 'nocheck' 'nodeps' 'noextract' 'nosign' 'pkg:' 'repackage' 'rmdeps' + 'nocheck' 'nodeps' 'noextract' 'noprepare' 'nosign' 'pkg:' 'repackage' 'rmdeps' 'sign' 'skipchecksums' 'skipinteg' 'skippgpcheck' 'source' 'syncdeps' 'verifysource' 'version') @@ -2564,6 +2565,7 @@ while true; do -L|--log) LOGGING=1 ;; -m|--nocolor) USE_COLOR='n' ;; --nocheck) RUN_CHECK='n' ;; + --noprepare) RUN_PREPARE='n' ;; --nosign) SIGNPKG='n' ;; -o|--nobuild) NOBUILD=1 ;; -p) shift; BUILDFILE=$1 ;; @@ -2796,7 +2798,10 @@ fi # test for available PKGBUILD functions if declare -f prepare >/dev/null; then - PREPAREFUNC=1 + # "Hide" prepare() function if not going to be run + if [[ $RUN_PREPARE != "n" ]]; then + PREPAREFUNC=1 + fi fi if declare -f build >/dev/null; then BUILDFUNC=1 -- cgit v1.2.3-70-g09d2