summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-03-14 09:52:18 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-03-15 06:27:19 -0700
commitcc02a00d27c6e4e6929ddb7c6ade2a278ca28f61 (patch)
tree6bdebf1a630e94184960a55301809024a27324fb /meta/classes
parent215293c51e82b1ad2939131a3cfa48cbc5d965ef (diff)
downloadpoky-cc02a00d27c6e4e6929ddb7c6ade2a278ca28f61.tar.gz
uninative: Add compatiblity version check
If glibc is newer on the host than in uninative, the failure mode is pretty nasty for clusters where the sstate is shared, including the Yocto Project autobuilder. This check aborts the use of uninative in such scenarios where a newer glibc version appears and avoids corruption of sstate caches. We use ldd to check the glibc version since that is included in libc-bin (or equivalent) which locales use so it should always be present. (From OE-Core rev: d6f6101cd0ae92e8ad2dec0bcb6db5044726edf9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/uninative.bbclass7
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/classes/uninative.bbclass b/meta/classes/uninative.bbclass
index 670efa9f05..1723364284 100644
--- a/meta/classes/uninative.bbclass
+++ b/meta/classes/uninative.bbclass
@@ -77,6 +77,11 @@ python uninative_event_fetchloader() {
77 except FileExistsError: 77 except FileExistsError:
78 pass 78 pass
79 79
80 # ldd output is "ldd (Ubuntu GLIBC 2.23-0ubuntu10) 2.23", extract last option from first line
81 glibcver = subprocess.check_output(["ldd", "--version"]).decode('utf-8').split('\n')[0].split()[-1]
82 if bb.utils.vercmp_string(d.getVar("UNINATIVE_MAXGLIBCVERSION"), glibcver) < 0:
83 raise RuntimeError("Your host glibc verson (%s) is newer than that in uninative (%s). Disabling uninative so that sstate is not corrupted." % (glibcver, d.getVar("UNINATIVE_MAXGLIBCVERSION")))
84
80 cmd = d.expand("\ 85 cmd = d.expand("\
81mkdir -p ${UNINATIVE_STAGING_DIR}-uninative; \ 86mkdir -p ${UNINATIVE_STAGING_DIR}-uninative; \
82cd ${UNINATIVE_STAGING_DIR}-uninative; \ 87cd ${UNINATIVE_STAGING_DIR}-uninative; \
@@ -94,6 +99,8 @@ ${UNINATIVE_STAGING_DIR}-uninative/relocate_sdk.py \
94 99
95 enable_uninative(d) 100 enable_uninative(d)
96 101
102 except RuntimeError as e:
103 bb.warn(str(e))
97 except bb.fetch2.BBFetchException as exc: 104 except bb.fetch2.BBFetchException as exc:
98 bb.warn("Disabling uninative as unable to fetch uninative tarball: %s" % str(exc)) 105 bb.warn("Disabling uninative as unable to fetch uninative tarball: %s" % str(exc))
99 bb.warn("To build your own uninative loader, please bitbake uninative-tarball and set UNINATIVE_TARBALL appropriately.") 106 bb.warn("To build your own uninative loader, please bitbake uninative-tarball and set UNINATIVE_TARBALL appropriately.")