diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-01-01 22:23:02 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-01-01 22:23:02 -0500 |
commit | df2f833665d56f55dfe04045248f1a38b83cb3fd (patch) | |
tree | 758a92b3a901592ef9bc71f19ea6e8c15434421d | |
parent | 3f0d656e1fd1d6fde1fe46ecad7de88d600a488f (diff) |
makechrootpkg.sh: use full paths in messages, short names were ambiguous
-rw-r--r-- | src/chroot-tools/makechrootpkg.sh.patch | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/src/chroot-tools/makechrootpkg.sh.patch b/src/chroot-tools/makechrootpkg.sh.patch index ab08bb9..ae22e0c 100644 --- a/src/chroot-tools/makechrootpkg.sh.patch +++ b/src/chroot-tools/makechrootpkg.sh.patch @@ -1,5 +1,5 @@ ---- makechrootpkg.sh.in 2014-11-05 23:52:13.770870816 -0500 -+++ makechrootpkg.sh.ugly 2014-11-06 00:06:34.803542413 -0500 +--- makechrootpkg.sh.in 2015-01-01 16:44:06.432049525 -0500 ++++ makechrootpkg.sh.ugly 2015-01-01 22:20:08.269220861 -0500 @@ -1,4 +1,6 @@ #!/bin/bash +# License: GNU GPLv2 @@ -104,11 +104,11 @@ + "Locking clean chroot [%s]" "$chrootdir/root" - stat_busy "Creating clean working copy [%s]" "$copy" -+ stat_busy "Synchronizing chroot copy [%s] -> [%s]" "$chrootdir" "$copy" ++ stat_busy "Synchronizing chroot copy [%s] -> [%s]" "$chrootdir/root" "$copydir" if [[ "$chroottype" == btrfs ]] && ! mountpoint -q "$copydir"; then if [[ -d $copydir ]]; then btrfs subvolume delete "$copydir" >/dev/null || -@@ -159,14 +180,19 @@ +@@ -159,14 +180,18 @@ # Drop the read lock again lock_close 8 @@ -120,18 +120,17 @@ -clean_temporary() { - stat_busy "Removing temporary copy [%s]" "$copy" -+# Usage: delete_chroot $copydir [$copy] ++# Usage: delete_chroot $copydir +delete_chroot() { + local copydir=$1 -+ local copy=${2:-$copydir} + # Detect chrootdir filesystem type + local chroottype=$(stat -f -c %T "$copydir") + -+ stat_busy "Removing chroot copy [%s]" "$copy" ++ stat_busy "Removing chroot copy [%s]" "$copydir" if [[ "$chroottype" == btrfs ]] && ! mountpoint -q "$copydir"; then btrfs subvolume delete "$copydir" >/dev/null || die "Unable to delete subvolume %s" "$copydir" -@@ -181,9 +207,14 @@ +@@ -181,9 +206,14 @@ stat_done } @@ -146,7 +145,7 @@ for install_pkg in "${install_pkgs[@]}"; do pkgname="${install_pkg##*/}" cp "$install_pkg" "$copydir/$pkgname" -@@ -196,11 +227,19 @@ +@@ -196,11 +226,19 @@ rm "$copydir/$pkgname" done @@ -168,7 +167,7 @@ $repack || rm -rf "$copydir/build" mkdir -p "$copydir/build" -@@ -245,12 +284,12 @@ +@@ -245,12 +283,12 @@ printf 'builduser:x:%d:100:builduser:/:/usr/bin/nologin\n' "$builduser_uid" >>"$copydir/etc/passwd" chown -R "$builduser_uid" "$copydir"/{build,pkgdest,srcpkgdest,logdest,srcdest,startdir} @@ -183,7 +182,7 @@ sed -i '/^PACKAGER=/d' "$copydir/etc/makepkg.conf" echo "PACKAGER='${PACKAGER}'" >> "$copydir/etc/makepkg.conf" fi -@@ -263,8 +302,20 @@ +@@ -263,8 +301,20 @@ chmod 440 "$copydir/etc/sudoers.d/builduser-pacman" fi @@ -204,7 +203,7 @@ { printf '#!/bin/bash\n' declare -f _chrootbuild -@@ -285,13 +336,19 @@ +@@ -285,13 +335,19 @@ chmod +x "$copydir/chrootbuild" } @@ -226,7 +225,7 @@ makepkg --config="$copydir/etc/makepkg.conf" --verifysource -o else ( export SRCDEST BUILDDIR="$builddir" -@@ -301,10 +358,10 @@ +@@ -301,10 +357,10 @@ (( $? != 0 )) && die "Could not download sources." # Clean up garbage from verifysource @@ -239,7 +238,7 @@ # This function isn't run in makechrootpkg, # so no global variables -@@ -313,6 +370,7 @@ +@@ -313,6 +369,7 @@ shopt -s nullglob # XXX: Workaround makepkg disliking read-only dirs @@ -247,7 +246,7 @@ ln -sft /srcdest /srcdest_host/* ln -sft /startdir /startdir_host/* -@@ -342,15 +400,42 @@ +@@ -342,15 +399,42 @@ exit 1 fi @@ -291,7 +290,7 @@ for l in "$copydir"/logdest/*; do [[ $l == */logpipe.* ]] && continue chown "$src_owner" "$l" -@@ -364,6 +449,10 @@ +@@ -364,6 +448,10 @@ } # }}} @@ -302,7 +301,7 @@ umask 0022 load_vars "$USER_HOME/.makepkg.conf" -@@ -375,30 +464,45 @@ +@@ -375,30 +463,45 @@ [[ -d $SRCPKGDEST ]] || SRCPKGDEST=$PWD [[ -d $LOGDEST ]] || LOGDEST=$PWD @@ -350,11 +349,11 @@ fi -$temp_chroot && clean_temporary -+$temp_chroot && delete_chroot "$copydir" "$copy" ++$temp_chroot && delete_chroot "$copydir" if (( ret != 0 )); then if $temp_chroot; then -@@ -409,3 +513,4 @@ +@@ -409,3 +512,4 @@ else true fi |