diff options
author | Mattia Rizzolo <mattia@debian.org> | 2017-06-16 14:48:35 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2017-06-18 19:30:44 +0200 |
commit | 22b48c202a1c71b190b40a55ca8edeebb63fefa7 (patch) | |
tree | 7247bbfd5fcd280838c4fd09c597951c77484446 /bin/reproducible_db_maintenance.py | |
parent | 412f53318d04abf448ea558f751715c54716e3f4 (diff) | |
download | jenkins.debian.net-22b48c202a1c71b190b40a55ca8edeebb63fefa7.tar.xz |
reproducible debian: introduce buster
Signed-off-by: Mattia Rizzolo <mattia@debian.org>
Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'bin/reproducible_db_maintenance.py')
-rwxr-xr-x | bin/reproducible_db_maintenance.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/bin/reproducible_db_maintenance.py b/bin/reproducible_db_maintenance.py index 825a38ae..27f3f56c 100755 --- a/bin/reproducible_db_maintenance.py +++ b/bin/reproducible_db_maintenance.py @@ -606,6 +606,26 @@ schema_updates = { "stats_builds_age", "stats_meta_pkg_state", "stats_build")] + [ "INSERT INTO rb_schema (version, date) VALUES (31, '" + now + "')" ], + 32: [ # copy stretch packages (includng results) in buster + """INSERT INTO sources (name, version, suite, architecture, notify_maintainer) + SELECT name, version, 'buster', architecture, notify_maintainer + FROM sources + WHERE suite = 'stretch'""" + """WITH buster AS ( + SELECT id, name, suite, architecture, version + FROM sources WHERE suite = 'buster'), + sr AS ( + SELECT s.name, s.architecture, r.id, r.version, r.status, + r.build_date, r.build_duration, r.node1, r.node2, r.job + FROM sources AS s JOIN results AS r ON s.id=r.package_id + WHERE s.suite = 'stretch') + INSERT INTO results (package_id, version, status, build_date, + build_duration, node1, node2, job) + SELECT b.id, sr.version, sr.status, sr.build_date, + sr.build_duration, sr.node1, sr.node2, sr.job + FROM buster AS b JOIN sr ON b.name=sr.name + AND b.architecture=sr.architecture""", + "INSERT INTO rb_schema (version, date) VALUES (32, '" + now + "')" } |