Commit 8a0a4d29 authored by gregor herrmann's avatar gregor herrmann

examples/check-build: update optional piuparts section.

Make output less verbose, add support for schroot, ignore dbgsym packages.
parent e5e77a29
......@@ -96,15 +96,27 @@ echo
read -n 1 -p "piuparts? y/N " PIU
if [ "$PIU" = "y" ]; then
PIUPARTSLOG="${CHANGES%.changes}_piuparts.log"
CHROOT=
[ -f /var/cache/pbuilder/base.tar.gz ] && CHROOT="--pbuilder"
[ -f /var/cache/pbuilder/base.tgz ] && CHROOT="--pbuilder"
[ -d /var/cache/pbuilder/base.cow ] && CHROOT="--existing-chroot /var/cache/pbuilder/base.cow"
# default is --no-minimize; add -minimize for pbuilder/cowbuilder, not for schroot
[ -f /var/cache/pbuilder/base.tar.gz ] && CHROOT="--pbuilder --minimize"
[ -f /var/cache/pbuilder/base.tgz ] && CHROOT="--pbuilder --minimize"
[ -d /var/cache/pbuilder/base.cow ] && CHROOT="--existing-chroot /var/cache/pbuilder/base.cow --minimize"
# no eatmydata in chroot; proxy not resolvable
[ -x /usr/bin/schroot ] && schroot -l | grep -q default && CHROOT="--schroot default --no-eatmydata --proxy=''"
CHANGESPIU="${CHANGES%.changes}_piuparts.changes"
if grep -qE "^Binary: .+-dbgsym.*$" "$CHANGES" ; then
grep -vE '\-dbgsym_.+\.deb$' "$CHANGES" > "$CHANGESPIU"
else
cp "$CHANGES" "$CHANGESPIU"
fi
# log-level: error < info < debug < dump
sudo /usr/sbin/piuparts \
$CHROOT -t ${TMPDIR:-/tmp} \
--warn-on-others --skip-logrotatefiles-test --minimize --warn-on-debsums-errors \
--log-file="${CHANGES%.changes}_piuparts.log" \
"$CHANGES"
--warn-on-others --warn-on-debsums-errors --skip-logrotatefiles-test \
--log-level=debug --log-file="$PIUPARTSLOG" \
"$CHANGESPIU"
rm "$CHANGESPIU"
fi
echo
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment