From b65acc7705a21aea81bb15e2a092d68be6a9a087 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Thu, 17 Dec 2015 21:31:31 +0100 Subject: reproducible archlinux: refactor egrep usage --- bin/reproducible_html_archlinux.sh | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/bin/reproducible_html_archlinux.sh b/bin/reproducible_html_archlinux.sh index 83ad1f81..aa076c7e 100755 --- a/bin/reproducible_html_archlinux.sh +++ b/bin/reproducible_html_archlinux.sh @@ -46,19 +46,11 @@ for REPOSITORY in $ARCHLINUX_REPOS ; do echo " $PKG" >> $HTML_BUFFER echo " " >> $HTML_BUFFER if [ -z "$(cd $ARCHBASE/$REPOSITORY/$PKG/ ; ls *.pkg.tar.xz.html 2>/dev/null)" ] ; then - if [ ! -z "$(grep '==> ERROR: Could not resolve all dependencies' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then + if [ ! -z "$(grep '(==> ERROR: Could not resolve all dependencies|==> ERROR: .pacman. failed to install missing dependencies)' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then HTML_TARGET=$HTML_DEPWAIT let NR_DEPWAIT+=1 echo " \"depwait could not resolve dependencies" >> $HTML_BUFFER - elif [ ! -z "$(egrep '==> ERROR: .pacman. failed to install missing dependencies.' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then - HTML_TARGET=$HTML_DEPWAIT - let NR_DEPWAIT+=1 - echo " \"depwait failed to install dependencies" >> $HTML_BUFFER - elif [ ! -z "$(egrep '==> ERROR: Failure while downloading' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then - HTML_TARGET=$HTML_404 - let NR_404+=1 - echo " \"404 failed to download source" >> $HTML_BUFFER - elif [ ! -z "$(egrep '==> ERROR: One or more PGP signatures could not be verified' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then + elif [ ! -z "$(egrep '(==> ERROR: Failure while downloading|==> ERROR: One or more PGP signatures could not be verified)' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then HTML_TARGET=$HTML_404 let NR_404+=1 EXTRA_REASON="" @@ -66,22 +58,14 @@ for REPOSITORY in $ARCHLINUX_REPOS ; do EXTRA_REASON="(unknown public key)" fi echo " \"404 failed to verify source with PGP signatures $EXTRA_REASON" >> $HTML_BUFFER - elif [ ! -z "$(egrep '==> ERROR: One or more files did not pass the validity check' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then + elif [ ! -z "$(egrep '(==> ERROR: One or more files did not pass the validity check|makepkg was killed by timeout after)' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then HTML_TARGET=$HTML_FTBFS let NR_FTBFS+=1 echo " \"ftbfs failed to verify source" >> $HTML_BUFFER - elif [ ! -z "$(egrep '==> ERROR: A failure occurred in (build|package)' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then + elif [ ! -z "$(egrep '==> ERROR: A failure occurred in (build|package|check)' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then HTML_TARGET=$HTML_FTBFS let NR_FTBFS+=1 echo " \"ftbfs failed to build from source" >> $HTML_BUFFER - elif [ ! -z "$(egrep '==> ERROR: A failure occurred in check' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then - HTML_TARGET=$HTML_FTBFS - let NR_FTBFS+=1 - echo " \"ftbfs failed to build from source, while running tests" >> $HTML_BUFFER - elif [ ! -z "$(egrep 'makepkg was killed by timeout after' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then - HTML_TARGET=$HTML_FTBFS - let NR_FTBFS+=1 - echo " \"ftbfs failed to build, killed by timeout" >> $HTML_BUFFER else echo " probably failed to build from source, please investigate" >> $HTML_BUFFER HTML_TARGET=$HTML_UNKNOWN -- cgit v1.2.3-54-g00ecf