diff options
author | Simon McVittie <smcv@collabora.com> | 2019-03-18 17:27:40 +0000 |
---|---|---|
committer | Andrej Shadura <andrewsh@debian.org> | 2020-08-06 10:24:20 +0200 |
commit | e299dda47b813693fb0578fe55ad6318d1e9e73c (patch) | |
tree | a2d2d98ea261fd77a13760036186c8a108194fbc | |
parent | 5cbc7a0b9fa53b8e186593a2d381fdb419db0fd6 (diff) |
build-recipe-dsc: List contents of build results
Debian's sbuild dumps the metadata and contents of all build results
into its own logs, which is often helpful when comparing build logs and
package contents. Let's do the same.
Signed-off-by: Simon McVittie <smcv@collabora.com>
Forwarded: https://github.com/openSUSE/obs-build/pull/497
Gbp-Pq: Name build-recipe-dsc-List-contents-of-build-results.patch
-rw-r--r-- | build-recipe-dsc | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/build-recipe-dsc b/build-recipe-dsc index 3ee4077..3bf145e 100644 --- a/build-recipe-dsc +++ b/build-recipe-dsc @@ -86,6 +86,8 @@ EOF dsc_build() { local buildroot=$1 + local changes + local f DSC_BUILD_OPTIONS= if test -n "$BUILD_JOBS" ; then @@ -106,6 +108,37 @@ dsc_build() { chroot $buildroot su - else chroot $buildroot su -c "export DEB_BUILD_OPTIONS=${DSC_BUILD_OPTIONS} ; cd $TOPDIR/BUILD && $DSC_BUILD_CMD" - $BUILD_USER < /dev/null && BUILD_SUCCEEDED=true + + for changes in "$buildroot/$TOPDIR"/*.changes ; do + echo + echo "==== $(basename "$changes") ====" + echo + cat "$changes" + echo + + while read f ; do + case "$f" in + (*.buildinfo) + echo "==== $f ====" + echo + cat "$buildroot/$TOPDIR/$f" + echo + esac + done < <(sed -ne '/Files:/,$s/^ ................................ [0-9][0-9]* [^ ]* [^ ]* //p' "$changes") + + while read f ; do + case "$f" in + (*.deb|*.ddeb|*.udeb) + echo "==== $f ====" + echo + chroot "$buildroot" su -c "dpkg-deb --info $(printf '%q' "$TOPDIR/$f")" - "$BUILD_USER" < /dev/null || true + echo + chroot "$buildroot" su -c "dpkg-deb --contents $(printf '%q' "$TOPDIR/$f")" - "$BUILD_USER" < /dev/null || true + echo + esac + done < <(sed -ne '/Files:/,$s/^ ................................ [0-9][0-9]* [^ ]* [^ ]* //p' "$changes") + done + if test "$BUILD_SUCCEEDED" = true -a "$DO_CHECKS" != "false" && ( chroot $buildroot su -c "which lintian > /dev/null" - $BUILD_USER < /dev/null ); then DEB_CHANGESFILE=${DEB_DSCFILE%.dsc}$OBS_DCH_RELEASE"_"$(chroot $buildroot su -c 'dpkg-architecture -qDEB_BUILD_ARCH')".changes" chroot $buildroot su -c "cd $TOPDIR && echo Running lintian && (set -x && lintian -i $TOPDIR/$DEB_CHANGESFILE)" - $BUILD_USER < /dev/null || BUILD_SUCCEEDED=false |