File createrepo-0.9.9-generate-gzip-headers.patch of Package createrepo

diff -ru a/createrepo/utils.py b/createrepo/utils.py
--- a/createrepo/utils.py	2011-01-26 18:14:30.000000000 +0100
+++ b/createrepo/utils.py	2012-01-25 14:54:00.939491715 +0100
@@ -35,21 +36,14 @@
 
 class GzipFile(gzip.GzipFile):
     def _write_gzip_header(self):
+        # Generate a header that is easily reproduced with gzip -9 -n on
+        # an unix-like system
         self.fileobj.write('\037\213')             # magic header
         self.fileobj.write('\010')                 # compression method
-        if hasattr(self, 'name'):
-            fname = self.name[:-3]
-        else:
-            fname = self.filename[:-3]
-        flags = 0
-        if fname:
-            flags = FNAME
-        self.fileobj.write(chr(flags))
-        write32u(self.fileobj, long(0))
-        self.fileobj.write('\002')
-        self.fileobj.write('\377')
-        if fname:
-            self.fileobj.write(fname + '\000')
+        self.fileobj.write('\000')                 # flags
+        write32u(self.fileobj, long(0))            # timestamp
+        self.fileobj.write('\002')                 # max compression
+        self.fileobj.write('\003')                 # UNIX
 
 
 class LzmaFile:
openSUSE Build Service is sponsored by