summaryrefslogtreecommitdiffstats
path: root/meta/classes/sanity.bbclass
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2017-12-05 17:34:08 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-12-10 22:45:20 +0000
commitdaa509f9e42013029d443ee01e72c18357b6bc34 (patch)
tree8505c966eba7773d33659cddc168acd55e5557b5 /meta/classes/sanity.bbclass
parent64b5d93f3a685e304242607cb2e541efa6387be6 (diff)
downloadpoky-daa509f9e42013029d443ee01e72c18357b6bc34.tar.gz
sanity: getstatusoutput returns an int, not a string
This code is an error path so nobody noticed that oe.utils.getstatusoutput() is just a wrapper around subprocess.getstatusoutput() which returns an (int, string) pair not (string, string). (From OE-Core rev: 33bf6e05af0a68da32f0484460b1de5f7f4eea98) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sanity.bbclass')
-rw-r--r--meta/classes/sanity.bbclass6
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 1feb7949da..1410af2901 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -462,7 +462,7 @@ def check_make_version(sanity_data):
462 from distutils.version import LooseVersion 462 from distutils.version import LooseVersion
463 status, result = oe.utils.getstatusoutput("make --version") 463 status, result = oe.utils.getstatusoutput("make --version")
464 if status != 0: 464 if status != 0:
465 return "Unable to execute make --version, exit code %s\n" % status 465 return "Unable to execute make --version, exit code %d\n" % status
466 version = result.split()[2] 466 version = result.split()[2]
467 if LooseVersion(version) == LooseVersion("3.82"): 467 if LooseVersion(version) == LooseVersion("3.82"):
468 # Construct a test file 468 # Construct a test file
@@ -498,7 +498,7 @@ def check_tar_version(sanity_data):
498 from distutils.version import LooseVersion 498 from distutils.version import LooseVersion
499 status, result = oe.utils.getstatusoutput("tar --version") 499 status, result = oe.utils.getstatusoutput("tar --version")
500 if status != 0: 500 if status != 0:
501 return "Unable to execute tar --version, exit code %s\n" % status 501 return "Unable to execute tar --version, exit code %d\n" % status
502 version = result.split()[3] 502 version = result.split()[3]
503 if LooseVersion(version) < LooseVersion("1.24"): 503 if LooseVersion(version) < LooseVersion("1.24"):
504 return "Your version of tar is older than 1.24 and has bugs which will break builds. Please install a newer version of tar.\n" 504 return "Your version of tar is older than 1.24 and has bugs which will break builds. Please install a newer version of tar.\n"
@@ -511,7 +511,7 @@ def check_git_version(sanity_data):
511 from distutils.version import LooseVersion 511 from distutils.version import LooseVersion
512 status, result = oe.utils.getstatusoutput("git --version 2> /dev/null") 512 status, result = oe.utils.getstatusoutput("git --version 2> /dev/null")
513 if status != 0: 513 if status != 0:
514 return "Unable to execute git --version, exit code %s\n" % status 514 return "Unable to execute git --version, exit code %d\n" % status
515 version = result.split()[2] 515 version = result.split()[2]
516 if LooseVersion(version) < LooseVersion("1.8.3.1"): 516 if LooseVersion(version) < LooseVersion("1.8.3.1"):
517 return "Your version of git is older than 1.8.3.1 and has bugs which will break builds. Please install a newer version of git.\n" 517 return "Your version of git is older than 1.8.3.1 and has bugs which will break builds. Please install a newer version of git.\n"