From b2113e819c8a390bc553c9bd21ed8d4eb7e607b9 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Fri, 10 Oct 2014 15:37:04 +0200 Subject: reproducible: refactor, speed up --- bin/reproducible_stats.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/reproducible_stats.sh b/bin/reproducible_stats.sh index 58dd43e0..d0829ecc 100755 --- a/bin/reproducible_stats.sh +++ b/bin/reproducible_stats.sh @@ -325,10 +325,8 @@ process_packages() { for PKG in $@ ; do RESULT=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT build_date,version,status FROM source_packages WHERE name = \"$PKG\"") BUILD_DATE=$(echo $RESULT|cut -d "|" -f1) - VERSION=$(echo $RESULT|cut -d "|" -f2) - STATUS=$(echo $RESULT|cut -d "|" -f3) - # remove epoch - EVERSION=$(echo $VERSION | cut -d ":" -f2) + # version with epoch removed + EVERSION=$(echo $RESULT | cut -d "|" -f2 | cut -d ":" -f2) if $BUILDINFO_SIGNS && [ -f "/var/lib/jenkins/userContent/buildinfo/${PKG}_${EVERSION}_amd64.buildinfo" ] ; then STAR[$PKG]="β" # used to be a star... fi @@ -337,6 +335,8 @@ process_packages() { FILE=$(find $(dirname $NAVI) -name $(basename $NAVI) ! -newermt "$BUILD_DATE" 2>/dev/null || true) # if no navigation exists, or is older than last build_date or if a note exist... if [ ! -f $NAVI ] || [ "$FILE" != "" ] || [ "${NOTES_PACKAGE[${PKG}]}" != "" ] ; then + VERSION=$(echo $RESULT | cut -d "|" -f2) + STATUS=$(echo $RESULT | cut -d "|" -f3) MAINLINK="" init_navi_frame "$PKG" "$VERSION" "$STATUS" "$BUILD_DATE" "${STAR[$PKG]}" append2navi_frame "${NOTES_PACKAGE[${PKG}]}" -- cgit v1.2.3-70-g09d2