diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2019-01-04 06:32:09 +0100 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2019-01-10 04:25:12 +0100 |
commit | 268b0255fa2dd6ccef2e4fa08859c7966002e15a (patch) | |
tree | c582028f65cf6ec004e78574fc63ef9d9098a1e9 /scripts | |
parent | c5c7fc7f4a361a9a347845b930030077898cd83f (diff) | |
download | pacman-268b0255fa2dd6ccef2e4fa08859c7966002e15a.tar.gz pacman-268b0255fa2dd6ccef2e4fa08859c7966002e15a.tar.xz |
makepkg: add internal variable to track when we're building a package
There are state variables for everything else, and we use them to do
conditional checks on things, but it's currently a bit difficult to test
whether a package is being built, as it's the default action if *no*
options are specified.
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | 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 237d1cdb..00137e66 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -58,6 +58,7 @@ known_hash_algos=('md5' 'sha1' 'sha224' 'sha256' 'sha384' 'sha512') # Options ASDEPS=0 BUILDFUNC=0 +BUILDPKG=1 CHECKFUNC=0 CLEANBUILD=0 CLEANUP=0 @@ -1047,7 +1048,7 @@ while true; do --noprogressbar) PACMAN_OPTS+=("--noprogressbar") ;; # Makepkg Options - --allsource) SOURCEONLY=2 ;; + --allsource) BUILDPKG=0 SOURCEONLY=2 ;; -A|--ignorearch) IGNOREARCH=1 ;; -c|--clean) CLEANUP=1 ;; -C|--cleanbuild) CLEANBUILD=1 ;; @@ -1058,7 +1059,7 @@ while true; do -f|--force) FORCE=1 ;; -F) INFAKEROOT=1 ;; # generating integrity checks does not depend on architecture - -g|--geninteg) GENINTEG=1 IGNOREARCH=1;; + -g|--geninteg) BUILDPKG=0 GENINTEG=1 IGNOREARCH=1;; --holdver) HOLDVER=1 ;; -i|--install) INSTALL=1 ;; --key) shift; GPGKEY=$1 ;; @@ -1068,10 +1069,10 @@ while true; do --nocheck) RUN_CHECK='n' ;; --noprepare) RUN_PREPARE='n' ;; --nosign) SIGNPKG='n' ;; - -o|--nobuild) NOBUILD=1 ;; + -o|--nobuild) BUILDPKG=0 NOBUILD=1 ;; -p) shift; BUILDFILE=$1 ;; - --packagelist) PACKAGELIST=1 IGNOREARCH=1;; - --printsrcinfo) PRINTSRCINFO=1 IGNOREARCH=1;; + --packagelist) BUILDPKG=0 PACKAGELIST=1 IGNOREARCH=1;; + --printsrcinfo) BUILDPKG=0 PRINTSRCINFO=1 IGNOREARCH=1;; -r|--rmdeps) RMDEPS=1 ;; -R|--repackage) REPKG=1 ;; --sign) SIGNPKG='y' ;; @@ -1079,8 +1080,8 @@ while true; do --skipinteg) SKIPCHECKSUMS=1; SKIPPGPCHECK=1 ;; --skippgpcheck) SKIPPGPCHECK=1;; -s|--syncdeps) DEP_BIN=1 ;; - -S|--source) SOURCEONLY=1 ;; - --verifysource) VERIFYSOURCE=1 ;; + -S|--source) BUILDPKG=0 SOURCEONLY=1 ;; + --verifysource) BUILDPKG=0 VERIFYSOURCE=1 ;; -h|--help) usage; exit $E_OK ;; -V|--version) version; exit $E_OK ;; |