X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fmake_changelog.py;h=d2b9ba7b0eb477f66d22f39a10d9502921fe444f;hb=ffa6f7b4004942f0f1a83dc8a7766fc3a5f0ae0f;hp=ac5581d02be8ae43a3de98d4145a1ef1a49cb7f3;hpb=886522194878afe478e4dd61397493f35b5b0e5d;p=dak.git diff --git a/dak/make_changelog.py b/dak/make_changelog.py index ac5581d0..d2b9ba7b 100755 --- a/dak/make_changelog.py +++ b/dak/make_changelog.py @@ -169,12 +169,14 @@ def export_files(session, pool, clpool): unpack = {} files = ('changelog', 'copyright', 'NEWS.Debian', 'README.Debian') stats = {'unpack': 0, 'created': 0, 'removed': 0, 'errors': 0, 'files': 0} - query = """SELECT DISTINCT s.source, su.suite_name AS suite, s.version, f.filename + query = """SELECT DISTINCT s.source, su.suite_name AS suite, s.version, c.name || '/' || 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 + JOIN files_archive_map fam ON f.id = fam.file_id AND fam.archive_id = su.id + JOIN component c ON fam.component_id = c.id ORDER BY s.source, suite""" for p in session.execute(query): @@ -225,7 +227,7 @@ def export_files(session, pool, clpool): os.link(version, suite) stats['created'] += 1 unpacked.cleanup() - except Exception, e: + except Exception as e: print 'make-changelog: unable to unpack %s\n%s' % (p, e) stats['errors'] += 1 @@ -263,8 +265,8 @@ def main(): if not Cnf.has_key('Make-Changelog::Options::%s' % (i)): Cnf['Make-Changelog::Options::%s' % (i)] = '' - apt_pkg.ParseCommandLine(Cnf, Arguments, sys.argv) - Options = Cnf.SubTree('Make-Changelog::Options') + apt_pkg.parse_commandline(Cnf, Arguments, sys.argv) + Options = Cnf.subtree('Make-Changelog::Options') suite = Cnf['Make-Changelog::Options::Suite'] base_suite = Cnf['Make-Changelog::Options::Base-Suite'] binnmu = Cnf['Make-Changelog::Options::binNMU']