diff options
author | kpcyrd <kpcyrd@archlinux.org> | 2023-08-25 04:02:56 +0200 |
---|---|---|
committer | Levente Polyak <anthraxx@archlinux.org> | 2023-11-26 16:48:15 +0100 |
commit | ae14c246b800139e3a8f5589fb8fe12aaeab6a76 (patch) | |
tree | f0f339444b78f906de59da1e412943736f08e60d /src | |
parent | cc369e86d2e060d8b65c7dbbb0c933d18f8aa6b0 (diff) | |
download | devtools-ae14c246b800139e3a8f5589fb8fe12aaeab6a76.tar.xz |
feat(makerepropkg): Add option to skip running check for speedup
Add -n to allow running makepkg with --nocheck. This is useful to reduce
the time required to reproduce a package, as they should not depend on
running the check function for being reproducible.
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/makerepropkg.in | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/makerepropkg.in b/src/makerepropkg.in index 398d4af..a31f8d5 100644 --- a/src/makerepropkg.in +++ b/src/makerepropkg.in @@ -22,6 +22,7 @@ declare -a buildenv buildopts installed installpkgs archiveurl='https://archive.archlinux.org/packages' buildroot=/var/lib/archbuild/reproducible diffoscope=0 +makepkg_options=() chroot=$USER [[ -n ${SUDO_USER:-} ]] && chroot=$SUDO_USER @@ -116,6 +117,7 @@ For more details see https://reproducible-builds.org/ OPTIONS -d Run diffoscope if the package is unreproducible + -n Do not run the check() function in the PKGBUILD -c <dir> Set pacman cache -M <file> Location of a makepkg config file -l <chroot> The directory name to use as the chroot namespace @@ -128,9 +130,10 @@ __EOF__ # save all args for check_root orig_args=("$@") -while getopts 'dM:c:l:h' arg; do +while getopts 'dnM:c:l:h' arg; do case "$arg" in d) diffoscope=1 ;; + n) makepkg_options+=(--nocheck) ;; M) archroot_args+=(-M "$OPTARG") ;; c) cache_dirs+=("$OPTARG") ;; l) chroot="$OPTARG" ;; @@ -254,7 +257,7 @@ install -d -o "${SUDO_UID:-$UID}" -g "$(id -g "${SUDO_UID:-$UID}")" "${namespace arch-nspawn "${namespace}/build" \ --bind="${PWD}:/startdir" \ --bind="${SRCDEST}:/srcdest" \ - /chrootbuild -C --noconfirm --log --holdver --skipinteg + /chrootbuild -C --noconfirm --log --holdver --skipinteg "${makepkg_options[@]}" ret=$? if (( ${ret} == 0 )); then |