diff options
| -rw-r--r-- | meta/classes/sanity.bbclass | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index 029c6e4fbe..900d97a33e 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass | |||
| @@ -649,9 +649,9 @@ def check_sanity_sstate_dir_change(sstate_dir, data): | |||
| 649 | return testmsg | 649 | return testmsg |
| 650 | 650 | ||
| 651 | def check_sanity_version_change(status, d): | 651 | def check_sanity_version_change(status, d): |
| 652 | # Sanity checks to be done when SANITY_VERSION changes | 652 | # Sanity checks to be done when SANITY_VERSION or NATIVELSBSTRING changes |
| 653 | # In other words, these tests run once in a given build directory and then | 653 | # In other words, these tests run once in a given build directory and then |
| 654 | # never again until the sanity version changes. | 654 | # never again until the sanity version or host distrubution id/version changes. |
| 655 | 655 | ||
| 656 | # Check the python install is complete. glib-2.0-natives requries | 656 | # Check the python install is complete. glib-2.0-natives requries |
| 657 | # xml.parsers.expat | 657 | # xml.parsers.expat |
| @@ -945,6 +945,7 @@ def check_sanity(sanity_data): | |||
| 945 | last_sanity_version = 0 | 945 | last_sanity_version = 0 |
| 946 | last_tmpdir = "" | 946 | last_tmpdir = "" |
| 947 | last_sstate_dir = "" | 947 | last_sstate_dir = "" |
| 948 | last_nativelsbstr = "" | ||
| 948 | sanityverfile = sanity_data.expand("${TOPDIR}/conf/sanity_info") | 949 | sanityverfile = sanity_data.expand("${TOPDIR}/conf/sanity_info") |
| 949 | if os.path.exists(sanityverfile): | 950 | if os.path.exists(sanityverfile): |
| 950 | with open(sanityverfile, 'r') as f: | 951 | with open(sanityverfile, 'r') as f: |
| @@ -955,12 +956,17 @@ def check_sanity(sanity_data): | |||
| 955 | last_tmpdir = line.split()[1] | 956 | last_tmpdir = line.split()[1] |
| 956 | if line.startswith('SSTATE_DIR'): | 957 | if line.startswith('SSTATE_DIR'): |
| 957 | last_sstate_dir = line.split()[1] | 958 | last_sstate_dir = line.split()[1] |
| 959 | if line.startswith('NATIVELSBSTRING'): | ||
| 960 | last_nativelsbstr = line.split()[1] | ||
| 958 | 961 | ||
| 959 | check_sanity_everybuild(status, sanity_data) | 962 | check_sanity_everybuild(status, sanity_data) |
| 960 | 963 | ||
| 961 | sanity_version = int(sanity_data.getVar('SANITY_VERSION', True) or 1) | 964 | sanity_version = int(sanity_data.getVar('SANITY_VERSION', True) or 1) |
| 962 | network_error = False | 965 | network_error = False |
| 963 | if last_sanity_version < sanity_version: | 966 | # NATIVELSBSTRING var may have been overridden with "universal", so |
| 967 | # get actual host distribution id and version | ||
| 968 | nativelsbstr = lsb_distro_identifier(sanity_data) | ||
| 969 | if last_sanity_version < sanity_version or last_nativelsbstr != nativelsbstr: | ||
| 964 | check_sanity_version_change(status, sanity_data) | 970 | check_sanity_version_change(status, sanity_data) |
| 965 | status.addresult(check_sanity_sstate_dir_change(sstate_dir, sanity_data)) | 971 | status.addresult(check_sanity_sstate_dir_change(sstate_dir, sanity_data)) |
| 966 | else: | 972 | else: |
| @@ -972,6 +978,7 @@ def check_sanity(sanity_data): | |||
| 972 | f.write("SANITY_VERSION %s\n" % sanity_version) | 978 | f.write("SANITY_VERSION %s\n" % sanity_version) |
| 973 | f.write("TMPDIR %s\n" % tmpdir) | 979 | f.write("TMPDIR %s\n" % tmpdir) |
| 974 | f.write("SSTATE_DIR %s\n" % sstate_dir) | 980 | f.write("SSTATE_DIR %s\n" % sstate_dir) |
| 981 | f.write("NATIVELSBSTRING %s\n" % nativelsbstr) | ||
| 975 | 982 | ||
| 976 | sanity_handle_abichanges(status, sanity_data) | 983 | sanity_handle_abichanges(status, sanity_data) |
| 977 | 984 | ||
