]> git.decadent.org.uk Git - dak.git/commitdiff
make-changelog: add archive option
authorAnsgar Burchardt <ansgar@debian.org>
Sun, 4 Nov 2012 13:58:04 +0000 (14:58 +0100)
committerAnsgar Burchardt <ansgar@debian.org>
Sun, 4 Nov 2012 13:58:37 +0000 (14:58 +0100)
We do not want to export changelogs for policy queues such as embargoed.

config/debian-security/export.sh
config/debian/dinstall.functions
dak/make_changelog.py

index 81d5ee085b8268e8d2b802c84b7d1adfa6b9d1f2..f3520e82edaebc3cf65ec592afbebb4c1f74174c 100755 (executable)
@@ -19,7 +19,7 @@ export LC_ALL=C
 # extract changelogs and stuff
 function changelogs() {
     log "Extracting changelogs"
-    dak make-changelog -e
+    dak make-changelog -e -a security
     mkdir -p ${exportpublic}/changelogs
     cd ${exportpublic}/changelogs
     rsync -aHW --delete --delete-after --ignore-errors ${exportdir}/changelogs/. .
index c32733cff5cabb9d0fbc4452d3270912b89a6306..064ba81b393987b42ec4923a35624475b590e9dd 100644 (file)
@@ -575,7 +575,7 @@ EOF
 # extract changelogs and stuff
 function changelogs() {
     log "Extracting changelogs"
-    dak make-changelog -e
+    dak make-changelog -e -a ftp-master
     mkdir -p ${exportpublic}/changelogs
     cd ${exportpublic}/changelogs
     rsync -aHW --delete --delete-after --ignore-errors ${exportdir}/changelogs/. .
index d2b9ba7b0eb477f66d22f39a10d9502921fe444f..dbcbf576c8381c790f697fec0740cddfa45a73e4 100755 (executable)
@@ -160,10 +160,11 @@ def display_changes(uploads, index):
         print upload[index]
         prev_upload = upload[0]
 
-def export_files(session, pool, clpool):
+def export_files(session, archive, clpool):
     """
     Export interesting files from source packages.
     """
+    pool = os.path.join(archive.path, 'pool')
 
     sources = {}
     unpack = {}
@@ -177,9 +178,10 @@ def export_files(session, pool, clpool):
                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
+               WHERE su.archive = :archive_id
                ORDER BY s.source, suite"""
 
-    for p in session.execute(query):
+    for p in session.execute(query, {'archive_id': archive.archive_id}):
         if not sources.has_key(p[0]):
             sources[p[0]] = {}
         sources[p[0]][p[1]] = (re_no_epoch.sub('', p[2]), p[3])
@@ -256,6 +258,7 @@ def main():
     Cnf = utils.get_conf()
     cnf = Config()
     Arguments = [('h','help','Make-Changelog::Options::Help'),
+                 ('a','archive','Make-Changelog::Options::Help','HasArg'),
                  ('s','suite','Make-Changelog::Options::Suite','HasArg'),
                  ('b','base-suite','Make-Changelog::Options::Base-Suite','HasArg'),
                  ('n','binnmu','Make-Changelog::Options::binNMU'),
@@ -283,8 +286,9 @@ def main():
 
     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)
-            export_files(session, Cnf['Dir::Pool'], exportpath)
+            export_files(session, archive, exportpath)
         else:
             utils.fubar('No changelog export path defined')
     elif binnmu: