X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Ffilewriter.py;h=274ef5c12dadc8b6ab6a921c9680770f1628b48c;hb=e2c4fd7f21c3b33cd7192bded5d6373e0ee90374;hp=de74af6f2117c7fbd68283804053013406f85ba7;hpb=0054e47869fff84e927e7e29871860f9647cccac;p=dak.git diff --git a/daklib/filewriter.py b/daklib/filewriter.py index de74af6f..274ef5c1 100755 --- a/daklib/filewriter.py +++ b/daklib/filewriter.py @@ -65,7 +65,7 @@ class BaseFileWriter(object): # internal helper function def rename(self, filename): tempfilename = filename + '.new' - os.chmod(tempfilename, 0664) + os.chmod(tempfilename, 0o664) os.rename(tempfilename, filename) def close(self): @@ -74,11 +74,11 @@ class BaseFileWriter(object): ''' self.file.close() if self.gzip: - check_call('gzip --rsyncable <%s.new >%s.gz.new' % (self.path, self.path), + check_call('gzip -9cn --rsyncable <%s.new >%s.gz.new' % (self.path, self.path), shell = True) self.rename('%s.gz' % self.path) if self.bzip2: - check_call('bzip2 <%s.new >%s.bz2.new' % (self.path, self.path), shell = True) + check_call('bzip2 -9 <%s.new >%s.bz2.new' % (self.path, self.path), shell = True) self.rename('%s.bz2' % self.path) if self.uncompressed: self.rename(self.path) @@ -132,13 +132,9 @@ class PackagesFileWriter(BaseFileWriter): } flags.update(keywords) if flags['debtype'] == 'deb': - #TODO: for our initial tests of g-p-s2 we use a different location - #template = "dists/%(suite)s/%(component)s/binary-%(architecture)s/Packages" - template = "../../ftp.debian.org/web/newdists/%(suite)s/%(component)s/binary-%(architecture)s/Packages" + template = "dists/%(suite)s/%(component)s/binary-%(architecture)s/Packages" else: # udeb - #TODO: for our initial tests of g-p-s2 we use a different location - #template = "dists/%(suite)s/%(component)s/debian-installer/binary-%(architecture)s/Packages" - template = "../../ftp.debian.org/web/newdists/%(suite)s/%(component)s/debian-installer/binary-%(architecture)s/Packages" + template = "dists/%(suite)s/%(component)s/debian-installer/binary-%(architecture)s/Packages" BaseFileWriter.__init__(self, template, **flags) class SourcesFileWriter(BaseFileWriter): @@ -153,7 +149,5 @@ class SourcesFileWriter(BaseFileWriter): 'bzip2': True } flags.update(keywords) - #TODO: for our initial tests of g-p-s2 we use a different location - #template = "dists/%(suite)s/%(component)s/source/Sources" - template = "../../ftp.debian.org/web/newdists/%(suite)s/%(component)s/source/Sources" + template = "dists/%(suite)s/%(component)s/source/Sources" BaseFileWriter.__init__(self, template, **flags)