diff options
Diffstat (limited to 'meta/classes/siteinfo.bbclass')
-rw-r--r-- | meta/classes/siteinfo.bbclass | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/meta/classes/siteinfo.bbclass b/meta/classes/siteinfo.bbclass index 03d4c4fd20..6a2e4bf560 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, no_cache = False): | 156 | def siteinfo_get_files(d, aclocalcache = False): |
157 | sitedata = siteinfo_data(d) | 157 | sitedata = siteinfo_data(d) |
158 | sitefiles = "" | 158 | sitefiles = "" |
159 | for path in d.getVar("BBPATH", True).split(":"): | 159 | for path in d.getVar("BBPATH", True).split(":"): |
@@ -162,11 +162,17 @@ def siteinfo_get_files(d, no_cache = False): | |||
162 | if os.path.exists(filename): | 162 | if os.path.exists(filename): |
163 | sitefiles += filename + " " | 163 | sitefiles += filename + " " |
164 | 164 | ||
165 | if no_cache: return sitefiles | 165 | if not aclocalcache: |
166 | return sitefiles | ||
166 | 167 | ||
167 | # Now check for siteconfig cache files | 168 | # Now check for siteconfig cache files in the directory setup by autotools.bbclass to |
168 | # Use the files copied to the aclocal cache generated by autotools.bbclass | 169 | # avoid races. |
169 | # to avoid races | 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 | ||
170 | path_siteconfig = d.getVar('ACLOCALDIR', True) | 176 | path_siteconfig = d.getVar('ACLOCALDIR', True) |
171 | if path_siteconfig and os.path.isdir(path_siteconfig): | 177 | if path_siteconfig and os.path.isdir(path_siteconfig): |
172 | for i in os.listdir(path_siteconfig): | 178 | for i in os.listdir(path_siteconfig): |
@@ -174,7 +180,6 @@ def siteinfo_get_files(d, no_cache = False): | |||
174 | continue | 180 | continue |
175 | filename = os.path.join(path_siteconfig, i) | 181 | filename = os.path.join(path_siteconfig, i) |
176 | sitefiles += filename + " " | 182 | sitefiles += filename + " " |
177 | |||
178 | return sitefiles | 183 | return sitefiles |
179 | 184 | ||
180 | # | 185 | # |