diff options
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/kernel-yocto.bbclass | 4 | ||||
-rw-r--r-- | meta/classes/package.bbclass | 8 | ||||
-rw-r--r-- | meta/classes/sanity.bbclass | 7 |
3 files changed, 9 insertions, 10 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass index d1b4f10254..c81e70e678 100644 --- a/meta/classes/kernel-yocto.bbclass +++ b/meta/classes/kernel-yocto.bbclass @@ -254,7 +254,7 @@ do_kernel_configme() { } python do_kernel_configcheck() { - import re, string, sys, commands + import re, string, sys, subprocess bb.plain("NOTE: validating kernel config, see log.do_kernel_configcheck for details") @@ -265,7 +265,7 @@ python do_kernel_configcheck() { pathprefix = "export PATH=%s:%s; " % (d.getVar('PATH', True), "${S}/scripts/util/") cmd = d.expand("cd ${S}; kconf_check -config- %s/meta-series ${S} ${B}" % kmeta) - ret, result = commands.getstatusoutput("%s%s" % (pathprefix, cmd)) + ret, result = subprocess.getstatusoutput("%s%s" % (pathprefix, cmd)) config_check_visibility = d.getVar( "KCONF_AUDIT_LEVEL", True ) or 1 if config_check_visibility == 1: 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) diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index 17420a8767..3836c0404d 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass @@ -342,13 +342,13 @@ def check_gcc_march(sanity_data): f = open("gcc_test.c", "w") f.write("int main (){ __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4; return 0;}\n") f.close() - import commands + import subprocess # Check if GCC could work without march - status,result = commands.getstatusoutput("${BUILD_PREFIX}gcc gcc_test.c -o gcc_test") + status,result = subprocess.getstatusoutput("${BUILD_PREFIX}gcc gcc_test.c -o gcc_test") if status != 0: # Check if GCC could work with march - status,result = commands.getstatusoutput("${BUILD_PREFIX}gcc -march=native gcc_test.c -o gcc_test") + status,result = subprocess.getstatusoutput("${BUILD_PREFIX}gcc -march=native gcc_test.c -o gcc_test") if status == 0: result = True else: @@ -370,7 +370,6 @@ def check_sanity(sanity_data): def LooseVersion(v): print("WARNING: sanity.bbclass can't compare versions without python-distutils") return 1 - import commands # Check the bitbake version meets minimum requirements minversion = sanity_data.getVar('BB_MIN_VERSION', True) |