diff options
| -rw-r--r-- | meta/classes/autotools.bbclass | 2 | ||||
| -rw-r--r-- | meta/classes/siteinfo.bbclass | 15 |
2 files changed, 5 insertions, 12 deletions
diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass index ac04a07cb5..efa4098d63 100644 --- a/meta/classes/autotools.bbclass +++ b/meta/classes/autotools.bbclass | |||
| @@ -141,7 +141,7 @@ ACLOCALEXTRAPATH_class-nativesdk = " -I ${STAGING_DATADIR_NATIVE}/aclocal/" | |||
| 141 | 141 | ||
| 142 | python autotools_aclocals () { | 142 | python autotools_aclocals () { |
| 143 | # Refresh variable with cache files | 143 | # Refresh variable with cache files |
| 144 | d.setVar("CONFIG_SITE", siteinfo_get_files(d, aclocalcache=True)) | 144 | d.setVar("CONFIG_SITE", siteinfo_get_files(d, sysrootcache=True)) |
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | CONFIGURE_FILES = "${S}/configure.in ${S}/configure.ac ${S}/config.h.in ${S}/acinclude.m4 Makefile.am" | 147 | CONFIGURE_FILES = "${S}/configure.in ${S}/configure.ac ${S}/config.h.in ${S}/acinclude.m4 Makefile.am" |
diff --git a/meta/classes/siteinfo.bbclass b/meta/classes/siteinfo.bbclass index 20b4704f1c..1aada40695 100644 --- a/meta/classes/siteinfo.bbclass +++ b/meta/classes/siteinfo.bbclass | |||
| @@ -153,7 +153,7 @@ python () { | |||
| 153 | bb.fatal("Please add your architecture to siteinfo.bbclass") | 153 | bb.fatal("Please add your architecture to siteinfo.bbclass") |
| 154 | } | 154 | } |
| 155 | 155 | ||
| 156 | def siteinfo_get_files(d, aclocalcache = False): | 156 | def siteinfo_get_files(d, sysrootcache = False): |
| 157 | sitedata = siteinfo_data(d) | 157 | sitedata = siteinfo_data(d) |
| 158 | sitefiles = "" | 158 | sitefiles = "" |
| 159 | for path in d.getVar("BBPATH").split(":"): | 159 | for path in d.getVar("BBPATH").split(":"): |
| @@ -162,18 +162,11 @@ def siteinfo_get_files(d, aclocalcache = False): | |||
| 162 | if os.path.exists(filename): | 162 | if os.path.exists(filename): |
| 163 | sitefiles += filename + " " | 163 | sitefiles += filename + " " |
| 164 | 164 | ||
| 165 | if not aclocalcache: | 165 | if not sysrootcache: |
| 166 | return sitefiles | 166 | return sitefiles |
| 167 | 167 | ||
| 168 | # Now check for siteconfig cache files in the directory setup by autotools.bbclass to | 168 | # Now check for siteconfig cache files in sysroots |
| 169 | # avoid races. | 169 | path_siteconfig = d.getVar('SITECONFIG_SYSROOTCACHE') |
| 170 | # | ||
| 171 | # ACLOCALDIR may or may not exist so cache should only be set to True from autotools.bbclass | ||
| 172 | # after files have been copied into this location. To do otherwise risks parsing/signature | ||
| 173 | # issues and the directory being created/removed whilst this code executes. This can happen | ||
| 174 | # when a multilib recipe is parsed along with its base variant which may be running at the time | ||
| 175 | # causing rare but nasty failures | ||
| 176 | path_siteconfig = d.getVar('ACLOCALDIR') | ||
| 177 | if path_siteconfig and os.path.isdir(path_siteconfig): | 170 | if path_siteconfig and os.path.isdir(path_siteconfig): |
| 178 | for i in os.listdir(path_siteconfig): | 171 | for i in os.listdir(path_siteconfig): |
| 179 | if not i.endswith("_config"): | 172 | if not i.endswith("_config"): |
