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, 12 insertions, 7 deletions
diff --git a/makechrootpkg.in b/makechrootpkg.in
index 9897eba..d308af2 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -242,6 +242,15 @@ download_sources() {
die "Could not download sources."
}
+move_logfiles() {
+ local l
+ for l in "$copydir"/logdest/*; do
+ [[ $l == */logpipe.* ]] && continue
+ chown "$src_owner" "$l"
+ mv "$l" "$LOGDEST"
+ done
+}
+
move_products() {
local pkgfile
for pkgfile in "$copydir"/pkgdest/*; do
@@ -254,12 +263,7 @@ move_products() {
fi
done
- local l
- for l in "$copydir"/logdest/*; do
- [[ $l == */logpipe.* ]] && continue
- chown "$src_owner" "$l"
- mv "$l" "$LOGDEST"
- done
+ move_logfiles
for s in "$copydir"/srcpkgdest/*; do
chown "$src_owner" "$s"
@@ -367,10 +371,11 @@ if arch-nspawn "$copydir" \
/chrootbuild "${makepkg_args[@]}"
then
mapfile -t pkgnames < <(sudo -u "$makepkg_user" bash -c 'source PKGBUILD; printf "%s\n" "${pkgname[@]}"')
+ move_products
else
(( ret += 1 ))
+ move_logfiles
fi
-move_products
(( temp_chroot )) && delete_chroot "$copydir" "$copy"