summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_db_maintenance.py
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-04-10 12:39:12 +0200
committerHolger Levsen <holger@layer-acht.org>2015-04-16 16:47:01 +0200
commit36798da6b02677f0d8d3808bb0541148d8e1c314 (patch)
tree1eae382af734b145cc29382b550fce25870e7314 /bin/reproducible_db_maintenance.py
parentefff11a45908152891feb1a1b071ad9871208190 (diff)
downloadjenkins.debian.net-36798da6b02677f0d8d3808bb0541148d8e1c314.tar.xz
reproducible: new db table: removed_packages, to track removed package and subsequently clean up files
the db now stores tuple of (pkgname, suite, architecture) of every removed packages, then reproducible_maintenance.sh pick up entries from it and find+remove files. For now the reproducible_maintenance only output what he would have remove.
Diffstat (limited to 'bin/reproducible_db_maintenance.py')
-rwxr-xr-xbin/reproducible_db_maintenance.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/reproducible_db_maintenance.py b/bin/reproducible_db_maintenance.py
index 17740398..003ae32b 100755
--- a/bin/reproducible_db_maintenance.py
+++ b/bin/reproducible_db_maintenance.py
@@ -354,6 +354,13 @@ schema_updates = {
url TEXT,
PRIMARY KEY (name))''',
'INSERT INTO rb_schema VALUES ("10", "' + now + '")'],
+ 11: [ # table with removed packages, to enable the maintenance job to do clean up
+ '''CREATE TABLE removed_packages (
+ name TEXT NOT NULL,
+ suite TEXT NOT NULL,
+ architecture TEXT NOT NULL,
+ PRIMARY KEY (name, suite, architecture))''',
+ 'INSERT INTO rb_schema VALUES ("11", "' + now + '")'],
}