]> err.no Git - dak/commitdiff
Use changelog export path derived from projectb
authorLuca Falavigna <dktrkranz@debian.org>
Mon, 29 Apr 2013 12:33:31 +0000 (12:33 +0000)
committerLuca Falavigna <dktrkranz@debian.org>
Mon, 29 Apr 2013 12:33:31 +0000 (12:33 +0000)
dak/make_changelog.py

index 2d52d0693a461dd071b42a30ddff8e4cb0366d6f..b904deaa5e7899b19c8118afb05cbec95d76fec7 100755 (executable)
@@ -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
 
@@ -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, exportpath) = session.query(Archive.archive_name, Archive.changelog). \
+                                    filter_by(archive_name=Options['Archive']).one()
+        if exportpath:
             export_files(session, archive, exportpath, progress)
             generate_export_filelist(exportpath)
         else: