summaryrefslogtreecommitdiffstats
path: root/meta/classes/sanity.bbclass
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2013-06-27 09:08:33 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-06-28 09:14:07 +0100
commit9b007f61b20b3f1bb20eaf2bc80f1abd797dc9a5 (patch)
tree06a5b590a08a5796ca459aefed16da2461686c03 /meta/classes/sanity.bbclass
parentf744edc0b8752b20c2a0335aa67312bc3b953507 (diff)
downloadpoky-9b007f61b20b3f1bb20eaf2bc80f1abd797dc9a5.tar.gz
sanity.bbclass: Check for the known broken version of make
See GNU Savannah bug 30612 -- make 3.82 is known to be broken. A number of vendors are providing a modified version, so checking for just the version string is not enough. We also need to check if the patch for the issue has been applied. We use a modified version of the reproduced to check for the issue. (From OE-Core rev: dede532a980b0fabf0beae4519b89ec74a1c2474) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sanity.bbclass')
-rw-r--r--meta/classes/sanity.bbclass37
1 files changed, 37 insertions, 0 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 2508aff79e..b190eb2347 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -306,6 +306,42 @@ def check_gcc_march(sanity_data):
306 306
307 return result 307 return result
308 308
309# Unpatched versions of make 3.82 are known to be broken. See GNU Savannah Bug 30612.
310# Use a modified reproducer from http://savannah.gnu.org/bugs/?30612 to validate.
311def check_make_version(sanity_data):
312 from distutils.version import LooseVersion
313 status, result = oe.utils.getstatusoutput("make --version")
314 if status != 0:
315 return "Unable to execute make --version, exit code %s\n" % status
316 version = result.split()[2]
317 if LooseVersion(version) == LooseVersion("3.82"):
318 # Construct a test file
319 f = open("makefile_test", "w")
320 f.write("makefile_test.a: makefile_test_a.c makefile_test_b.c makefile_test.a( makefile_test_a.c makefile_test_b.c)\n")
321 f.write("\n")
322 f.write("makefile_test_a.c:\n")
323 f.write(" touch $@\n")
324 f.write("\n")
325 f.write("makefile_test_b.c:\n")
326 f.write(" touch $@\n")
327 f.close()
328
329 # Check if make 3.82 has been patched
330 status,result = oe.utils.getstatusoutput("make -f makefile_test")
331
332 os.remove("makefile_test")
333 if os.path.exists("makefile_test_a.c"):
334 os.remove("makefile_test_a.c")
335 if os.path.exists("makefile_test_b.c"):
336 os.remove("makefile_test_b.c")
337 if os.path.exists("makefile_test.a"):
338 os.remove("makefile_test.a")
339
340 if status != 0:
341 return "Your version of make 3.82 is broken. Please revert to 3.81 or install a patched version.\n"
342 return None
343
344
309# Tar version 1.24 and onwards handle overwriting symlinks correctly 345# Tar version 1.24 and onwards handle overwriting symlinks correctly
310# but earlier versions do not; this needs to work properly for sstate 346# but earlier versions do not; this needs to work properly for sstate
311def check_tar_version(sanity_data): 347def check_tar_version(sanity_data):
@@ -436,6 +472,7 @@ def check_sanity_version_change(status, d):
436 except ImportError: 472 except ImportError:
437 status.addresult('Your python is not a full install. Please install the module xml.parsers.expat (python-xml on openSUSE and SUSE Linux).\n') 473 status.addresult('Your python is not a full install. Please install the module xml.parsers.expat (python-xml on openSUSE and SUSE Linux).\n')
438 474
475 status.addresult(check_make_version(d))
439 status.addresult(check_tar_version(d)) 476 status.addresult(check_tar_version(d))
440 status.addresult(check_git_version(d)) 477 status.addresult(check_git_version(d))
441 478