diff options
author | Holger Levsen <holger@layer-acht.org> | 2014-10-12 18:00:52 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2014-10-12 18:00:52 +0200 |
commit | 4792c4d6a600d2a50d20a02893095a0d17ef8b38 (patch) | |
tree | 3594116168460cb64ca385a471132470aad14a03 | |
parent | bf740f1577176466c19fb2d67bc5f6daf3b5b124 (diff) | |
download | jenkins.debian.net-4792c4d6a600d2a50d20a02893095a0d17ef8b38.tar.xz |
reproducible: refactor
-rwxr-xr-x | bin/reproducible_build.sh | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh index d95bf4c0..1f5a357d 100755 --- a/bin/reproducible_build.sh +++ b/bin/reproducible_build.sh @@ -37,13 +37,11 @@ update_sources_table() { if [ "$BET" = "" ] ; then BET=$VERSION continue - elif dpkg --compare-versions "$BET" gt "$VERSION" ; then - sqlite3 -init $INIT ${PACKAGES_DB} "DELETE FROM sources WHERE name = '$PKG' AND version = '$VERSION'" - else - sqlite3 -init $INIT ${PACKAGES_DB} "DELETE FROM sources WHERE name = '$PKG' AND version = '$BET'" - BET=$VERSION + elif dpkg --compare-versions "$BET" lt "$VERSION" ; then + BET=$VERSION fi done + sqlite3 -init $INIT ${PACKAGES_DB} "DELETE FROM sources WHERE name = '$PKG' AND version != '$BET'" done echo "$(date) Done removing duplicate versions from sources db..." # update amount of available packages (for doing statistics later) |