diff options
author | Holger Levsen <holger@layer-acht.org> | 2014-11-18 01:52:34 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2014-11-18 01:52:34 +0100 |
commit | 4ad042a29d9146189adfe62eeaa6c930e4764d4a (patch) | |
tree | ad3dae011fd0f92e122c4ab10f9735cce1446f4c /bin | |
parent | 2c802c7ec958e9ee92ba25427df96370325be799 (diff) | |
download | jenkins.debian.net-4ad042a29d9146189adfe62eeaa6c930e4764d4a.tar.xz |
reproducible: remove removed packages from db
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_maintainance.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/bin/reproducible_maintainance.sh b/bin/reproducible_maintainance.sh index f7682245..083d269e 100755 --- a/bin/reproducible_maintainance.sh +++ b/bin/reproducible_maintainance.sh @@ -101,6 +101,23 @@ if grep -q '|' $PACKAGES ; then fi rm $PACKAGES +# find packages which have been removed from sid +QUERY="SELECT source_packages.name FROM source_packages + WHERE source_packages.name NOT IN + (SELECT sources.name FROM sources) + LIMIT 25" +PACKAGES=$(sqlite3 -init $INIT ${PACKAGES_DB} "$QUERY") +if [ -z "$PACKAGES" ] ; then + echo + echo "Removing these removed packages from database:" + echo $PACKAGES + QUERY="DELETE FROM source_packages + WHERE source_packages.name NOT IN + (SELECT sources.name FROM sources) + LIMIT 25" + sqlite3 -init $INIT ${PACKAGES_DB} "$QUERY" +fi + if ! $DIRTY ; then echo "Everything seems to be fine." echo |