From e2e1dcd74bc45381baccf507c0309dd792229afe Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 7 May 2013 13:56:05 +0100 Subject: sanity/patch.py: Remove commands module usage The commands module is removed in python3. Use the subprocess module instead and the pipes module to replace the mkargs usage. Signed-off-by: Richard Purdie --- meta/classes/package.bbclass | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'meta/classes/package.bbclass') diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 96228b0bc0..1dba185b3e 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass @@ -233,7 +233,7 @@ def splitdebuginfo(file, debugfile, debugsrcdir, d): # # sourcefile is also generated containing a list of debugsources - import commands, stat, subprocess + import stat, subprocess dvar = d.getVar('PKGD', True) objcopy = d.getVar("OBJCOPY", True) @@ -283,7 +283,7 @@ def copydebugsources(debugsrcdir, d): # The debug src information written out to sourcefile is further procecessed # and copied to the destination here. - import commands, stat, subprocess + import stat, subprocess sourcefile = d.expand("${WORKDIR}/debugsources.list") if debugsrcdir and os.path.isfile(sourcefile): @@ -696,7 +696,7 @@ python fixup_perms () { } python split_and_strip_files () { - import commands, stat, errno, subprocess + import stat, errno, subprocess dvar = d.getVar('PKGD', True) pn = d.getVar('PN', True) @@ -732,7 +732,7 @@ python split_and_strip_files () { # 16 - kernel module def isELF(path): type = 0 - ret, result = commands.getstatusoutput("file '%s'" % path) + ret, result = subprocess.getstatusoutput("file '%s'" % path) if ret: bb.error("split_and_strip_files: 'file %s' failed" % path) -- cgit 1.2.3-korg