diff options
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/sanity.bbclass | 37 |
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. | ||
311 | def 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 |
311 | def check_tar_version(sanity_data): | 347 | def 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 | ||