diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index 359a7cb5f..8d259d911 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -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(bz2|gz))))?$', self.input_patch) + match = re.match(r'(^|.*/)patch-\d+\.\d+\.\d+(-\S+?)?(\.(?P(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)]):