X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Ffilewriter.py;h=31093f008099c87bfa83c3d8773ebcb2cc6b2651;hb=ac89f32d430096e45648271e7c953aae7c45b9f7;hp=35919634e9e971515ff5388ff14289542e752ea8;hpb=c3210fb3c3eb33ff14df2f4bd3da087836089444;p=dak.git diff --git a/daklib/filewriter.py b/daklib/filewriter.py index 35919634..31093f00 100755 --- a/daklib/filewriter.py +++ b/daklib/filewriter.py @@ -98,3 +98,18 @@ class BinaryContentsFileWriter(BaseFileWriter): else: template = "dists/%(suite)s/Contents-%(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 = { + 'uncompressed': False, + 'gzip': True, + 'bzip2': False + } + flags.update(keywords) + template = "dists/%(suite)s/%(component)s/Contents-source" + BaseFileWriter.__init__(self, template, **flags)