X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fcontrol_suite.py;h=fcd4ca39562cf0c96e61f2364dc3e412a1b01ed0;hb=69f09ae38116af1a2f74db7eb6d9c84c23ed7384;hp=b862e215448167f3bbb696b88b2df4771ef4808e;hpb=7deb1e18b7e61f77b13fbc926c31d575ee5fc6b5;p=dak.git diff --git a/dak/control_suite.py b/dak/control_suite.py index b862e215..fcd4ca39 100755 --- a/dak/control_suite.py +++ b/dak/control_suite.py @@ -99,6 +99,16 @@ def britney_changelog(packages, suite, session): old = {} current = {} + try: + q = session.execute("SELECT changelog FROM suite WHERE id = :suiteid", \ + {'suiteid': suite.suite_id}) + brit_file = q.fetchone()[0] + except: + brit_file = None + + if not brit_file: + return + q = session.execute("""SELECT s.source, s.version, sa.id FROM source s, src_associations sa WHERE sa.suite = :suiteid @@ -129,14 +139,14 @@ def britney_changelog(packages, suite, session): q = session.execute(query) pu = None - brit = utils.open_file(Config()["Changelogs::Britney"], 'w') + brit = utils.open_file(brit_file, 'w') for u in q: if pu and pu != u[0]: brit.write("\n") brit.write("%s\n" % u[1]) pu = u[0] - if len(q): brit.write("\n\n\n") + if q.rowcount: brit.write("\n\n\n") for p in list(set(old.keys()).difference(current.keys())): brit.write("REMOVED: %s %s\n" % (p, old[p]))