X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fmake_changelog.py;h=8039bfab7ea8c588673013757dfba8ac0ed793f1;hb=9701189232ab74d2057abe9e59afab71530d7820;hp=5237d91ee0c4578fade24e3222b482230d4ef7a6;hpb=d18a7b96c5dbc9954f15c5a0f3b1768f1c75e0f1;p=dak.git diff --git a/dak/make_changelog.py b/dak/make_changelog.py index 5237d91e..8039bfab 100755 --- a/dak/make_changelog.py +++ b/dak/make_changelog.py @@ -166,8 +166,9 @@ def export_files(session, pool, clpool, temppath): """ sources = {} - query = """SELECT s.source, su.suite_name AS suite, s.version, f.filename + query = """SELECT DISTINCT s.source, su.suite_name AS suite, s.version, f.filename FROM source s + JOIN newest_source n ON n.source = s.source AND n.version = s.version JOIN src_associations sa ON sa.source = s.id JOIN suite su ON su.id = sa.suite JOIN files f ON f.id = s.file @@ -221,8 +222,7 @@ def export_files(session, pool, clpool, temppath): print 'make-changelog: unable to extract %s for %s_%s' \ % (os.path.basename(f), p, sources[p][s][0]) else: - print 'make-changelog: unable to unpack %s_%s' % (p, sources[p][s][0]) - continue + print 'make-changelog: unable to unpack %s_%s: %s' % (p, sources[p][s][0], output) rmtree(tempdir) @@ -267,7 +267,8 @@ def main(): if export: if cnf.exportpath: - export_files(session, Cnf['Dir::Pool'], cnf.exportpath, Cnf['Dir::TempPath']) + exportpath = os.path.join(Cnf['Dir::Export'], cnf.exportpath) + export_files(session, Cnf['Dir::Pool'], exportpath, Cnf['Dir::TempPath']) else: utils.fubar('No changelog export path defined') elif binnmu: