[arch-projects] [DEVTOOLS][PATCH 1/3] archbuild: build without updating the chroot
Dave Reisner
d at falconindy.com
Fri Aug 14 14:04:27 UTC 2015
On Thu, Aug 13, 2015 at 10:56:40PM +0200, seblu at archlinux.org wrote:
> From: Sébastien Luttringer <seblu at seblu.net>
>
> Useful when you need to build with an outdated package version
Why wouldn't you just call makechrootpkg directly?
> ---
> archbuild.in | 5 ++++-
> zsh_completion.in | 1 +
> 2 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/archbuild.in b/archbuild.in
> index 9c5d706..7d8d2a9 100644
> --- a/archbuild.in
> +++ b/archbuild.in
> @@ -17,11 +17,13 @@ else
> fi
> chroots='/var/lib/archbuild'
> clean_first=false
> +update=true
>
> usage() {
> echo "Usage: $cmd [options] -- [makechrootpkg args]"
> echo ' -h This help'
> echo ' -c Recreate the chroot before building'
> + echo ' -u Do not update the chroot before before building'
> echo ' -r <dir> Create chroots in this directory'
> echo ''
> echo "Default makechrootpkg args: ${makechrootpkg_args[*]}"
> @@ -34,6 +36,7 @@ orig_argv=("$@")
> while getopts 'hcr:' arg; do
> case "${arg}" in
> c) clean_first=true ;;
> + u) update=false ;;
> r) chroots="$OPTARG" ;;
> *) usage ;;
> esac
> @@ -67,7 +70,7 @@ if ${clean_first} || [[ ! -d "${chroots}/${repo}-${arch}" ]]; then
> -M "@pkgdatadir@/makepkg-${arch}.conf" \
> "${chroots}/${repo}-${arch}/root" \
> "${base_packages[@]}" || abort
> -else
> +elif $update; then
> lock 9 "${chroots}/${repo}-${arch}/root.lock" "Locking clean chroot"
> arch-nspawn \
> -C "@pkgdatadir@/pacman-${repo}.conf" \
> diff --git a/zsh_completion.in b/zsh_completion.in
> index 4c6dd99..8c418ea 100644
> --- a/zsh_completion.in
> +++ b/zsh_completion.in
> @@ -4,6 +4,7 @@ m4_include(lib/valid-tags.sh)
>
> _archbuild_args=(
> '-c[Recreate the chroot before building]'
> + '-u[Do not update the chroot before before building]'
> '-r[Create chroots in this directory]:base_dir:_files -/'
> )
>
> --
> Sébastien "Seblu" Luttringer
More information about the arch-projects
mailing list