mirror of
https://git.yoctoproject.org/poky
synced 2026-04-30 12:32:12 +02:00
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. (From OE-Core rev: e2e1dcd74bc45381baccf507c0309dd792229afe) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user