Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

makechrootpkg: Only expose failed build logs instead of products #55

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions makechrootpkg.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down Expand Up @@ -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"

Expand Down