From: Jan Kratochvil Date: Sun, 2 Aug 2020 19:48:28 +0000 (+0200) Subject: Workaround mock --resultdir: X-Git-Url: https://git.jankratochvil.net/?p=massrebuild.git;a=commitdiff_plain;h=418e9d7afac7d883a3bc4bd7469215244b9542e5;hp=6b155c0a5cfd3a0f63132147062ce09eea73b53b Workaround mock --resultdir: --addrepo does not work with --rebuild && --resultdir should warn for --chain mode https://bugzilla.redhat.com/show_bug.cgi?id=1857918 --- diff --git a/runone b/runone index 28d2c23..022d0e5 100755 --- a/runone +++ b/runone @@ -57,23 +57,23 @@ for pkg in "$@";do set +e # --chain instead of --rebuild as otherwise -a does not work $mock --resultdir=$resultdir --nocheck $(: -a https://people.redhat.com/jkratoch/dwzrepo/ ) --chain $srcrpm$ext &>$srcrpm$ext.mocklog - rc=$? + mockrc=$? set -e test -e $resultdir #rm -f $srcrpm$ext - if [ $rc -ne 0 ];then - touch $srcrpm$ext.mockfail - break - fi # --chain ignores --resultdir resultdirsrc="$(sed -n 's/^INFO: Results out to: //p' $srcrpm$ext.mocklog)" if [ ! -e $resultdirsrc/*/root.log ];then - touch $srcrpm$ext.mockrfail + touch $srcrpm$ext.mockfail break fi # With --chain $resultdir contains just some small *.log files. rm -rf $resultdir mv `dirname $resultdirsrc/*/root.log` $resultdir + if [ $mockrc -ne 0 ];then + touch $srcrpm$ext.mockfail + break + fi echo >$srcrpm$ext.rpmsize $(du -sbc /dev/null $resultdir/*-debuginfo*.rpm|tail -n1|awk '{print $1}') size=0 for i in $resultdir/*-debuginfo*.rpm;do