[kernel] r8390 - dists/trunk/linux-2.6/debian/patches/bugfix/all/stable

Bastian Blank waldi at alioth.debian.org
Sat Mar 24 11:11:19 UTC 2007


Author: waldi
Date: Sat Mar 24 10:11:19 2007
New Revision: 8390

Modified:
   dists/trunk/linux-2.6/debian/patches/bugfix/all/stable/gen-patch
Log:
debian/patches/bugfix/all/stable/gen-patch: Update.


Modified: dists/trunk/linux-2.6/debian/patches/bugfix/all/stable/gen-patch
==============================================================================
--- dists/trunk/linux-2.6/debian/patches/bugfix/all/stable/gen-patch	(original)
+++ dists/trunk/linux-2.6/debian/patches/bugfix/all/stable/gen-patch	Sat Mar 24 10:11:19 2007
@@ -21,9 +21,11 @@
         self.version = version
 
     def __call__(self):
-        patch = os.path.join(self.path, self.version.complete)
-        log = os.path.join(self.path, "%s.log" % self.version.complete)
-        print patch, log
+        base = self.version.complete
+        patch = base + '.patch'
+        log = base + '.log'
+        series = base + '.series'
+
         if self.version.patch == 1:
             tag_in = "v%s" % self.version.release
         else:
@@ -31,13 +33,12 @@
         tag_out = "v%s" % self.version.complete
         print tag_in, tag_out
 
-        f = os.popen("cd %s; git diff %s %s | filterdiff -p 1 -x Makefile" % (self.repo, tag_in, tag_out))
-        out = file(patch, 'w')
-        for line in f:
-            out.write(line)
-        f.close()
+        f = os.popen("cd %s; git diff %s %s | filterdiff -p 1 -x Makefile > %s" % (self.repo, tag_in, tag_out, os.path.join(self.path, patch)))
+        if f.close() is not None:
+            raise RuntimeError
+
         f = os.popen("cd %s; git log --pretty=oneline -r %s..%s" % (self.repo, tag_in, tag_out))
-        out = file(log, 'w')
+        out = file(os.path.join(self.path, log), 'w')
         out.write("  * Add stable release %s:\n" % self.version.complete)
         for line in f:
             line = line.strip()
@@ -45,7 +46,12 @@
                 continue
             hash, log = line.split(' ', 1)
             out.write("    - %s\n" % log)
-        f.close()
+        if f.close() is not None:
+            raise RuntimeError
+
+        out = file(os.path.join(self.path, series), 'w')
+        out.write("+ bugfix/all/stable/%s\n" % patch)
+        out.close()
 
 if __name__ == '__main__':
     path = os.path.realpath(os.path.dirname(sys.argv[0]))



More information about the Kernel-svn-changes mailing list