diff options
author | Jackie Huang <jackie.huang@windriver.com> | 2017-05-31 16:27:17 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-07-30 08:46:19 +0100 |
commit | e925d9b9cc50cb23dbfbe28f0c4fc72a56e40560 (patch) | |
tree | a4cf1a998f0289bf87ecf2117e27b9d778034f68 /meta/classes | |
parent | a88d33f47f7abf6cff482c7eefabdf7e54fee80f (diff) | |
download | poky-e925d9b9cc50cb23dbfbe28f0c4fc72a56e40560.tar.gz |
siteinfo: fix siteinfo_get_files to work with RSS
The siteconfig cache files in ACLOCALDIR setup by autotools.bbclass
has been dropped after switching to RSS, so change the siteconfig
search path back to SITECONFIG_SYSROOTCACHE and the parameter
name changed from aclocalcache to sysrootcache.
(From OE-Core rev: 5b1454304483a0bc725b32fd5458e5281c68112f)
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-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"): |