X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fmake_changelog.py;h=1f1b1ca3c46ec0b31fc866bcb89217d79d9b1b56;hb=52eb03dccab0a9898bca4d36a0a96ebe377fb977;hp=2d52d0693a461dd071b42a30ddff8e4cb0366d6f;hpb=819f06251381c58eb94f7952a5d37a8c8ee19572;p=dak.git diff --git a/dak/make_changelog.py b/dak/make_changelog.py index 2d52d069..1f1b1ca3 100755 --- a/dak/make_changelog.py +++ b/dak/make_changelog.py @@ -57,7 +57,6 @@ from shutil import rmtree from yaml import safe_dump from daklib.dbconn import * from daklib import utils -from daklib.config import Config from daklib.contents import UnpackedSource from daklib.regexes import re_no_epoch @@ -214,7 +213,7 @@ def export_files(session, archive, clpool, progress=False): for p in unpack.keys(): package = os.path.splitext(os.path.basename(p))[0].split('_') try: - unpacked = UnpackedSource(p) + unpacked = UnpackedSource(p, clpool) tempdir = unpacked.get_root_directory() stats['unpack'] += 1 if progress: @@ -293,7 +292,6 @@ def generate_export_filelist(clpool): def main(): Cnf = utils.get_conf() - cnf = Config() Arguments = [('h','help','Make-Changelog::Options::Help'), ('a','archive','Make-Changelog::Options::Archive','HasArg'), ('s','suite','Make-Changelog::Options::Suite','HasArg'), @@ -324,9 +322,9 @@ def main(): session = DBConn().session() if export: - if cnf.exportpath: - archive = session.query(Archive).filter_by(archive_name=Options['Archive']).one() - exportpath = os.path.join(Cnf['Dir::Export'], cnf.exportpath) + archive = session.query(Archive).filter_by(archive_name=Options['Archive']).one() + exportpath = archive.changelog + if exportpath: export_files(session, archive, exportpath, progress) generate_export_filelist(exportpath) else: