]> git.decadent.org.uk Git - dak.git/commitdiff
Merge branch 'pu/xz-for-indices'
authorAnsgar Burchardt <ansgar@debian.org>
Sun, 27 Oct 2013 15:20:41 +0000 (16:20 +0100)
committerAnsgar Burchardt <ansgar@debian.org>
Sun, 27 Oct 2013 15:20:41 +0000 (16:20 +0100)
Conflicts:
dak/generate_packages_sources2.py
daklib/filewriter.py

1  2 
dak/generate_packages_sources2.py
daklib/filewriter.py

index 3b58217a271df20671af2d9cf949cacbb097e64b,8b4773d8528152f4b6c32a19a38730eb4ae8eba4..7eca3c8cacc0460b858e9f2678fcc52f2a68b75c
@@@ -115,7 -103,13 +115,14 @@@ def generate_sources(suite_id, componen
  
      overridesuite_id = suite.get_overridesuite().suite_id
  
-     writer = SourcesFileWriter(archive=suite.archive.path, suite=suite.suite_name, component=component.component_name)
+     writer_args = {
++            'archive': suite.archive.path,
+             'suite': suite.suite_name,
+             'component': component.component_name
+     }
+     if suite.indices_compression is not None:
+         writer_args['compression'] = suite.indices_compression
+     writer = SourcesFileWriter(**writer_args)
      output = writer.open()
  
      # run query and write Sources
@@@ -238,13 -232,18 +245,20 @@@ def generate_packages(suite_id, compone
      if include_long_description:
          metadata_skip.append("Description-md5")
  
-     writer = PackagesFileWriter(archive=suite.archive.path, suite=suite.suite_name,
-             component=component.component_name,
-             architecture=architecture.arch_string, debtype=type_name)
+     writer_args = {
++            'archive': suite.archive.path,
+             'suite': suite.suite_name,
+             'component': component.component_name,
+             'architecture': architecture.arch_string,
+             'debtype': type_name
+     }
+     if suite.indices_compression is not None:
+         writer_args['compression'] = suite.indices_compression
+     writer = PackagesFileWriter(**writer_args)
      output = writer.open()
  
 -    r = session.execute(_packages_query, {"suite": suite_id, "component": component_id,
 +    r = session.execute(_packages_query, {"archive_id": suite.archive.archive_id,
 +        "suite": suite_id, "component": component_id, 'component_name': component.component_name,
          "arch": architecture_id, "type_id": type_id, "type_name": type_name, "arch_all": arch_all_id,
          "overridesuite": overridesuite_id, "metadata_skip": metadata_skip,
          "include_long_description": 'true' if include_long_description else 'false'})
@@@ -301,7 -300,14 +315,15 @@@ def generate_translations(suite_id, com
      suite = session.query(Suite).get(suite_id)
      component = session.query(Component).get(component_id)
  
-     writer = TranslationFileWriter(archive=suite.archive.path, suite=suite.suite_name, component=component.component_name, language="en")
+     writer_args = {
++            'archive': suite.archive.path,
+             'suite': suite.suite_name,
+             'component': component.component_name,
+             'language': 'en',
+     }
+     if suite.i18n_compression is not None:
+         writer_args['compression'] = suite.i18n_compression
+     writer = TranslationFileWriter(**writer_args)
      output = writer.open()
  
      r = session.execute(_translations_query, {"suite": suite_id, "component": component_id})
index 148dd171e8ce7e5105d31566f952021367f144a7,3b816ee9b5f53261151f7090d9f110774294274e..2f080e681b8cc050a0f73f1c317c72e921329db4
mode 100644,100755..100644
@@@ -47,7 -47,10 +47,8 @@@ class BaseFileWriter(object)
          self.uncompressed = 'none' in compression
          self.gzip = 'gzip' in compression
          self.bzip2 = 'bzip2' in compression
 -        root_dir = Config()['Dir::Root']
 -        relative_dir = template % keywords
 -        self.path = os.path.join(root_dir, relative_dir)
+         self.xz = 'xz' in compression
 +        self.path = template % keywords
  
      def open(self):
          '''