genorig: Accept xz-compressed upstream tarballs and patches, thanks to Sedat Dilek
svn path=/dists/trunk/linux/; revision=19885
This commit is contained in:
parent
3161f5713d
commit
9c86ce9fbb
|
@ -58,7 +58,7 @@ class Main(object):
|
||||||
'--prefix=%s/' % self.orig, self.tag],
|
'--prefix=%s/' % self.orig, self.tag],
|
||||||
cwd=input_repo,
|
cwd=input_repo,
|
||||||
stdout=subprocess.PIPE)
|
stdout=subprocess.PIPE)
|
||||||
extract_proc = subprocess.Popen(['tar', '-xf', '-'], cwd=self.dir,
|
extract_proc = subprocess.Popen(['tar', '-xaf', '-'], cwd=self.dir,
|
||||||
stdin=archive_proc.stdout)
|
stdin=archive_proc.stdout)
|
||||||
|
|
||||||
if extract_proc.wait():
|
if extract_proc.wait():
|
||||||
|
@ -66,15 +66,11 @@ class Main(object):
|
||||||
|
|
||||||
def upstream_extract(self, input_tar):
|
def upstream_extract(self, input_tar):
|
||||||
self.log("Extracting tarball %s\n" % input_tar)
|
self.log("Extracting tarball %s\n" % input_tar)
|
||||||
match = re.match(r'(^|.*/)(?P<dir>linux-\d+\.\d+(\.\d+)?(-\S+)?)\.tar(\.(?P<extension>(bz2|gz)))?$', input_tar)
|
match = re.match(r'(^|.*/)(?P<dir>linux-\d+\.\d+(\.\d+)?(-\S+)?)\.tar(\.(?P<extension>(bz2|gz|xz)))?$', input_tar)
|
||||||
if not match:
|
if not match:
|
||||||
raise RuntimeError("Can't identify name of tarball")
|
raise RuntimeError("Can't identify name of tarball")
|
||||||
|
|
||||||
cmdline = ['tar', '-xf', input_tar, '-C', self.dir]
|
cmdline = ['tar', '-xaf', input_tar, '-C', self.dir]
|
||||||
if match.group('extension') == 'bz2':
|
|
||||||
cmdline.append('-j')
|
|
||||||
elif match.group('extension') == 'gz':
|
|
||||||
cmdline.append('-z')
|
|
||||||
|
|
||||||
if subprocess.Popen(cmdline).wait():
|
if subprocess.Popen(cmdline).wait():
|
||||||
raise RuntimeError("Can't extract tarball")
|
raise RuntimeError("Can't extract tarball")
|
||||||
|
@ -83,7 +79,7 @@ class Main(object):
|
||||||
|
|
||||||
def upstream_patch(self, input_patch):
|
def upstream_patch(self, input_patch):
|
||||||
self.log("Patching source with %s\n" % input_patch)
|
self.log("Patching source with %s\n" % input_patch)
|
||||||
match = re.match(r'(^|.*/)patch-\d+\.\d+\.\d+(-\S+?)?(\.(?P<extension>(bz2|gz)))?$', input_patch)
|
match = re.match(r'(^|.*/)patch-\d+\.\d+\.\d+(-\S+?)?(\.(?P<extension>(bz2|gz|xz)))?$', input_patch)
|
||||||
if not match:
|
if not match:
|
||||||
raise RuntimeError("Can't identify name of patch")
|
raise RuntimeError("Can't identify name of patch")
|
||||||
cmdline = []
|
cmdline = []
|
||||||
|
@ -91,6 +87,8 @@ class Main(object):
|
||||||
cmdline.append('bzcat')
|
cmdline.append('bzcat')
|
||||||
elif match.group('extension') == 'gz':
|
elif match.group('extension') == 'gz':
|
||||||
cmdline.append('zcat')
|
cmdline.append('zcat')
|
||||||
|
elif match.group('extension') == 'xz':
|
||||||
|
cmdline.append('xzcat')
|
||||||
else:
|
else:
|
||||||
cmdline.append('cat')
|
cmdline.append('cat')
|
||||||
cmdline.append(input_patch)
|
cmdline.append(input_patch)
|
||||||
|
|
|
@ -6,6 +6,8 @@ linux (3.8.1-1~experimental.1) UNRELEASED; urgency=low
|
||||||
[ Ben Hutchings ]
|
[ Ben Hutchings ]
|
||||||
* linux-image: Increase minimum version of initramfs-tools to 0.110~
|
* linux-image: Increase minimum version of initramfs-tools to 0.110~
|
||||||
which copes with the recently renamed EHCI and NFS modules
|
which copes with the recently renamed EHCI and NFS modules
|
||||||
|
* genorig: Accept xz-compressed upstream tarballs and patches,
|
||||||
|
thanks to Sedat Dilek
|
||||||
|
|
||||||
[ Aurelien Jarno ]
|
[ Aurelien Jarno ]
|
||||||
* [mips/octeon] Change HW_RANDOM and HW_RANDOM_OCTEON to modules.
|
* [mips/octeon] Change HW_RANDOM and HW_RANDOM_OCTEON to modules.
|
||||||
|
|
Loading…
Reference in New Issue