1 Commits
v1.0.0 ... v1

Author SHA1 Message Date
ffa66e61ef fix: read gzipped builder-live.log when dumping chroot logs
copr-cli download-build fetches builder-live.log.gz (the on-mirror form
for completed builds), but the dump loop looked for plain builder-live.log
and silently emitted nothing. Try .gz first with zcat, fall back to plain,
and note the absence explicitly if neither is present.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 14:44:05 +03:00

View File

@@ -47,17 +47,22 @@ copr-cli download-build --dest "$LOG_DIR" "$BUILD_ID" || {
echo "warning: failed to download build artifacts" >&2 echo "warning: failed to download build artifacts" >&2
} }
# Dump each chroot's builder-live.log as a collapsible group. # Dump each chroot's builder-live.log as a collapsible group. COPR stores
# the log gzipped on the mirror once the build has finished; fall back to
# the plain file in case a backend version ever serves it uncompressed.
for chroot_dir in "$LOG_DIR"/*/; do for chroot_dir in "$LOG_DIR"/*/; do
[ -d "$chroot_dir" ] || continue [ -d "$chroot_dir" ] || continue
chroot=$(basename "$chroot_dir") chroot=$(basename "$chroot_dir")
log="${chroot_dir}builder-live.log" echo
if [ -f "$log" ]; then echo "::group::${chroot} builder-live.log"
echo if [ -f "${chroot_dir}builder-live.log.gz" ]; then
echo "::group::${chroot} builder-live.log" zcat "${chroot_dir}builder-live.log.gz"
cat "$log" elif [ -f "${chroot_dir}builder-live.log" ]; then
echo "::endgroup::" cat "${chroot_dir}builder-live.log"
else
echo "(no builder-live.log found for ${chroot})"
fi fi
echo "::endgroup::"
done done
exit "$STATUS" exit "$STATUS"