debian/bin/genorig.py

- Fix detection of uncompressed patch files.
- Create output directory.

svn path=/dists/trunk/linux-2.6/; revision=8455
This commit is contained in:
Bastian Blank 2007-04-10 13:39:56 +00:00
parent 1d5cbbba9d
commit ede2bc2d0a
1 changed files with 2 additions and 1 deletions

View File

@ -47,7 +47,7 @@ class main(object):
if self.input_patch is None:
return
self.log("Patching source with %s\n" % self.input_patch)
match = re.match(r'(^|.*/)(patch-\d+\.\d+\.\d+(-\S+)?(\.(?P<extension>(bz2|gz))))?$', self.input_patch)
match = re.match(r'(^|.*/)patch-\d+\.\d+\.\d+(-\S+?)?(\.(?P<extension>(bz2|gz)))?$', self.input_patch)
if not match:
raise RuntimeError("Can't identify name of patch")
cmdline = []
@ -64,6 +64,7 @@ class main(object):
def tar(self):
out = os.path.join("../orig", self.orig_tar)
os.mkdir("../orig")
self.log("Generate tarball %s\n" % out)
cmdline = ['tar -czf', out, '-C', self.dir, self.orig]
if os.spawnv(os.P_WAIT, '/bin/sh', ['sh', '-c', ' '.join(cmdline)]):