Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/makechrootpkg.in
diff options
context:
space:
mode:
Diffstat (limited to 'makechrootpkg.in')
-rw-r--r--makechrootpkg.in19
1 files changed, 9 insertions, 10 deletions
diff --git a/makechrootpkg.in b/makechrootpkg.in
index 9cb25fc..a77d14a 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -12,7 +12,8 @@ m4_include(lib/common.sh)
shopt -s nullglob
-makepkg_args=(-s --noconfirm -L --holdver)
+default_makepkg_args=(-s --noconfirm -L --holdver)
+makepkg_args=("${default_makepkg_args[@]}")
repack=false
update_first=false
clean_first=false
@@ -46,7 +47,7 @@ usage() {
echo 'command:'
echo ' mkarchroot <chrootdir>/root base-devel'
echo ''
- echo "Default makepkg args: ${makepkg_args[*]}"
+ echo "Default makepkg args: ${default_makepkg_args[*]}"
echo ''
echo 'Flags:'
echo '-h This help'
@@ -81,14 +82,14 @@ load_vars() {
create_chroot() {
# Lock the chroot we want to use. We'll keep this lock until we exit.
- lock 9 "$copydir.lock" "Locking chroot copy [$copy]"
+ lock 9 "$copydir.lock" "Locking chroot copy [%s]" "$copy"
if [[ ! -d $copydir ]] || $clean_first; then
# Get a read lock on the root chroot to make
# sure we don't clone a half-updated chroot
slock 8 "$chrootdir/root.lock" "Locking clean chroot"
- stat_busy "Creating clean working copy [$copy]"
+ stat_busy "Creating clean working copy [%s]" "$copy"
if [[ "$chroottype" == btrfs ]] && ! mountpoint -q "$copydir"; then
if [[ -d $copydir ]]; then
btrfs subvolume delete "$copydir" >/dev/null ||
@@ -103,7 +104,7 @@ create_chroot() {
stat_done
# Drop the read lock again
- exec 8>&-
+ lock_close 8
fi
# Update mtime
@@ -111,7 +112,7 @@ create_chroot() {
}
clean_temporary() {
- stat_busy "Removing temporary copy [$copy]"
+ stat_busy "Removing temporary copy [%s]" "$copy"
if [[ "$chroottype" == btrfs ]] && ! mountpoint -q "$copydir"; then
btrfs subvolume delete "$copydir" >/dev/null ||
die "Unable to delete subvolume %s" "$copydir"
@@ -215,9 +216,7 @@ EOF
{
printf '#!/bin/bash\n'
declare -f _chrootbuild
- printf '_chrootbuild'
- printf ' %q' "${makepkg_args[@]}"
- printf ' || exit\n'
+ printf '_chrootbuild "$@" || exit\n'
if $run_namcap; then
cat <<'EOF'
@@ -392,7 +391,7 @@ if arch-nspawn "$copydir" \
--bind-ro="$PWD:/startdir_host" \
--bind-ro="$SRCDEST:/srcdest_host" \
"${bindmounts_ro[@]}" "${bindmounts_rw[@]}" \
- /chrootbuild
+ /chrootbuild "${makepkg_args[@]}"
then
move_products
else