[arch-projects] [DEVTOOLS][PATCH 1/3] archbuild: build without updating the chroot
seblu at archlinux.org
seblu at archlinux.org
Thu Aug 13 20:56:40 UTC 2015
From: Sébastien Luttringer <seblu at seblu.net>
Useful when you need to build with an outdated package version
---
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