+ if flags['debtype'] == 'deb':
+ template = "%(archive)s/dists/%(suite)s/%(component)s/Contents-%(architecture)s"
+ else: # udeb
+ template = "%(archive)s/dists/%(suite)s/%(component)s/Contents-udeb-%(architecture)s"
+ BaseFileWriter.__init__(self, template, **flags)
+
+class SourceContentsFileWriter(BaseFileWriter):
+ def __init__(self, **keywords):
+ '''
+ The value of the keywords suite and component are strings.
+ Output files are gzip compressed only.
+ '''
+ flags = {
+ 'compression': ['gzip'],
+ }
+ flags.update(keywords)
+ template = "%(archive)s/dists/%(suite)s/%(component)s/Contents-source"
+ BaseFileWriter.__init__(self, template, **flags)
+
+class PackagesFileWriter(BaseFileWriter):
+ def __init__(self, **keywords):
+ '''
+ The value of the keywords suite, component, debtype and architecture
+ are strings. Output files are gzip compressed only.
+ '''
+ flags = {
+ 'compression': ['gzip', 'xz'],
+ }
+ flags.update(keywords)
+ if flags['debtype'] == 'deb':
+ template = "%(archive)s/dists/%(suite)s/%(component)s/binary-%(architecture)s/Packages"
+ else: # udeb
+ template = "%(archive)s/dists/%(suite)s/%(component)s/debian-installer/binary-%(architecture)s/Packages"
+ BaseFileWriter.__init__(self, template, **flags)
+
+class SourcesFileWriter(BaseFileWriter):
+ def __init__(self, **keywords):
+ '''
+ The value of the keywords suite and component are strings. Output
+ files are gzip compressed only.
+ '''
+ flags = {
+ 'compression': ['gzip', 'xz'],
+ }
+ flags.update(keywords)
+ template = "%(archive)s/dists/%(suite)s/%(component)s/source/Sources"