[kernel] r13750 - dists/trunk/linux-2.6/debian/bin
Bastian Blank
waldi at alioth.debian.org
Wed Jun 10 10:20:14 UTC 2009
Author: waldi
Date: Wed Jun 10 10:20:13 2009
New Revision: 13750
Log:
debian/bin/genorig.py: Use subprocess.
Modified:
dists/trunk/linux-2.6/debian/bin/genorig.py
Modified: dists/trunk/linux-2.6/debian/bin/genorig.py
==============================================================================
--- dists/trunk/linux-2.6/debian/bin/genorig.py Wed Jun 10 08:42:47 2009 (r13749)
+++ dists/trunk/linux-2.6/debian/bin/genorig.py Wed Jun 10 10:20:13 2009 (r13750)
@@ -7,6 +7,7 @@
import os.path
import re
import shutil
+import subprocess
from debian_linux.debian import Changelog, VersionLinux
from debian_linux.patches import PatchSeries
@@ -50,13 +51,17 @@
match = re.match(r'(^|.*/)(?P<dir>linux-\d+\.\d+\.\d+(-\S+)?)\.tar(\.(?P<extension>(bz2|gz)))?$', self.input_tar)
if not match:
raise RuntimeError("Can't identify name of tarball")
- cmdline = ['tar -xf', self.input_tar, '-C', self.dir]
+
+ cmdline = ['tar', '-xf', self.input_tar, '-C', self.dir]
if match.group('extension') == 'bz2':
cmdline.append('-j')
elif match.group('extension') == 'gz':
cmdline.append('-z')
- if os.spawnv(os.P_WAIT, '/bin/sh', ['sh', '-c', ' '.join(cmdline)]):
+
+ print cmdline
+ if subprocess.Popen(cmdline).wait():
raise RuntimeError("Can't extract tarball")
+
os.rename(os.path.join(self.dir, match.group('dir')), os.path.join(self.dir, self.orig))
def upstream_patch(self):
More information about the Kernel-svn-changes
mailing list