X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fcontrol_suite.py;h=c1c29dc29e096663148aa6819c52ac7b1e6a5695;hb=2a76a705c2236604e703884c6420b57efa60a9c9;hp=b862e215448167f3bbb696b88b2df4771ef4808e;hpb=7deb1e18b7e61f77b13fbc926c31d575ee5fc6b5;p=dak.git diff --git a/dak/control_suite.py b/dak/control_suite.py index b862e215..c1c29dc2 100755 --- a/dak/control_suite.py +++ b/dak/control_suite.py @@ -98,6 +98,19 @@ def britney_changelog(packages, suite, session): old = {} current = {} + Cnf = utils.get_conf() + + 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 brit_file: + brit_file = os.path.join(Cnf['Dir::Root'], brit_file) + else: + return q = session.execute("""SELECT s.source, s.version, sa.id FROM source s, src_associations sa @@ -129,14 +142,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]))