summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2019-03-18 17:27:40 +0000
committerHéctor Orón Martínez <zumbi@debian.org>2019-09-01 01:59:08 +0200
commit51bab0b0bf5a211238c05013a03d98c1856b9519 (patch)
tree1bb9bf0fa0889ae206536037dc45c9e05e5964af
parent1f83ba8825876b6176a363f7b53ff4567f769f11 (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-dsc33
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