diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-05-07 13:56:05 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-05-09 14:04:19 +0100 |
commit | e2e1dcd74bc45381baccf507c0309dd792229afe (patch) | |
tree | 71bca48bffd9feacc6bd8e2beb9c5a625ee1b297 /meta/classes/sanity.bbclass | |
parent | 4f47b3a4726dd47e8a6db228fcaf25d1890e3e52 (diff) | |
download | openembedded-core-contrib-e2e1dcd74bc45381baccf507c0309dd792229afe.tar.gz |
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 <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sanity.bbclass')
-rw-r--r-- | meta/classes/sanity.bbclass | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index 17420a87678..3836c0404d5 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) |