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:06:51 +0100 |
commit | e16faa55daca2a87190ce66dc98a37906ecf90af (patch) | |
tree | 1a332be79ff1d5a44b399e7180196b9d66ec261d /meta/classes/sanity.bbclass | |
parent | e1b5647d2c84579b65f54aa7ca07a41b1dd9470d (diff) | |
download | poky-e16faa55daca2a87190ce66dc98a37906ecf90af.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.
(From OE-Core rev: e2e1dcd74bc45381baccf507c0309dd792229afe)
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 17420a8767..3836c0404d 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass | |||
@@ -342,13 +342,13 @@ def check_gcc_march(sanity_data): | |||
342 | f = open("gcc_test.c", "w") | 342 | f = open("gcc_test.c", "w") |
343 | f.write("int main (){ __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4; return 0;}\n") | 343 | f.write("int main (){ __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4; return 0;}\n") |
344 | f.close() | 344 | f.close() |
345 | import commands | 345 | import subprocess |
346 | 346 | ||
347 | # Check if GCC could work without march | 347 | # Check if GCC could work without march |
348 | status,result = commands.getstatusoutput("${BUILD_PREFIX}gcc gcc_test.c -o gcc_test") | 348 | status,result = subprocess.getstatusoutput("${BUILD_PREFIX}gcc gcc_test.c -o gcc_test") |
349 | if status != 0: | 349 | if status != 0: |
350 | # Check if GCC could work with march | 350 | # Check if GCC could work with march |
351 | status,result = commands.getstatusoutput("${BUILD_PREFIX}gcc -march=native gcc_test.c -o gcc_test") | 351 | status,result = subprocess.getstatusoutput("${BUILD_PREFIX}gcc -march=native gcc_test.c -o gcc_test") |
352 | if status == 0: | 352 | if status == 0: |
353 | result = True | 353 | result = True |
354 | else: | 354 | else: |
@@ -370,7 +370,6 @@ def check_sanity(sanity_data): | |||
370 | def LooseVersion(v): | 370 | def LooseVersion(v): |
371 | print("WARNING: sanity.bbclass can't compare versions without python-distutils") | 371 | print("WARNING: sanity.bbclass can't compare versions without python-distutils") |
372 | return 1 | 372 | return 1 |
373 | import commands | ||
374 | 373 | ||
375 | # Check the bitbake version meets minimum requirements | 374 | # Check the bitbake version meets minimum requirements |
376 | minversion = sanity_data.getVar('BB_MIN_VERSION', True) | 375 | minversion = sanity_data.getVar('BB_MIN_VERSION', True) |