summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-11-21 16:16:40 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-11-24 15:53:07 (GMT)
commit3ecf5d9692fec97b37af6a4e6c747a4e2c2ca292 (patch)
tree0682708ed07caee695d59e5a7b877181a1042dd1
parente51345b50784572602a09a233b9d6f4847fe1f16 (diff)
downloadpoky-master.tar.gz
uninative: Don't use single sstate for pseudo-nativeHEADmaster
pseudo-native is a bit special. It conditionally compiles in support for xattr, statx and statvfs amongst other options. If a pseudo-native binary is used on a system where these functions are present but it wasn't compiled in we see hard to debug permissions problems. An example is the devtool.DevtoolExtractTests.test_devtool_deploy_target oe-selftest which shows a cryptic error: File "/home/pokybuild/yocto-worker/oe-selftest-fedora/build/meta/lib/oeqa/selftest/cases/devtool.py", line 1388, in test_devtool_deploy_target self.assertEqual(filelist1, filelist2) File "/usr/lib64/python3.9/unittest/case.py", line 831, in assertEqual assertion_func(first, second, msg=msg) File "/usr/lib64/python3.9/unittest/case.py", line 1037, in assertListEqual self.assertSequenceEqual(list1, list2, msg, seq_type=list) File "/usr/lib64/python3.9/unittest/case.py", line 1019, in assertSequenceEqual self.fail(msg) File "/usr/lib64/python3.9/unittest/case.py", line 670, in fail raise self.failureException(msg) AssertionError: Lists differ: ['-rwxr-xr-x 6000 6000 /etc/init.d/mdmonitor', '-rw-r-[10124 chars]n.8'] != ['-rwxr-xr-x root root /etc/init.d/mdmonitor', '-rw-r-[10124 chars]n.8'] First differing element 0: '-rwxr-xr-x 6000 6000 /etc/init.d/mdmonitor' '-rwxr-xr-x root root /etc/init.d/mdmonitor' This is due to a version of pseudo without statx being used on a system where ls uses statx, hence the files are displayed as 6000.6000 instead of root.root. Avoid this by always building pseudo-native for the specific distro in question rather than using a universal sstate feed. This hopefully fixes one of the mysterious AB-INT issues. (From OE-Core rev: 6e3785a3f1f3cf68f5fe101cd6bebe91db165973) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/base.bbclass1
-rw-r--r--meta/classes/sstate.bbclass4
-rw-r--r--meta/lib/oe/sstatesig.py2
3 files changed, 6 insertions, 1 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 5a0b0c6..78ae28b 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -231,6 +231,7 @@ python base_eventhandler() {
231 if isinstance(e, bb.event.ConfigParsed): 231 if isinstance(e, bb.event.ConfigParsed):
232 if not d.getVar("NATIVELSBSTRING", False): 232 if not d.getVar("NATIVELSBSTRING", False):
233 d.setVar("NATIVELSBSTRING", lsb_distro_identifier(d)) 233 d.setVar("NATIVELSBSTRING", lsb_distro_identifier(d))
234 d.setVar("ORIGNATIVELSBSTRING", d.getVar("NATIVELSBSTRING", False))
234 d.setVar('BB_VERSION', bb.__version__) 235 d.setVar('BB_VERSION', bb.__version__)
235 236
236 # There might be no bb.event.ConfigParsed event if bitbake server is 237 # There might be no bb.event.ConfigParsed event if bitbake server is
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index a8ae751..d08d950 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -72,6 +72,7 @@ BB_HASHFILENAME = "False ${SSTATE_PKGSPEC} ${SSTATE_SWSPEC}"
72 72
73SSTATE_ARCHS = " \ 73SSTATE_ARCHS = " \
74 ${BUILD_ARCH} \ 74 ${BUILD_ARCH} \
75 ${BUILD_ARCH}_${ORIGNATIVELSBSTRING} \
75 ${BUILD_ARCH}_${SDK_ARCH}_${SDK_OS} \ 76 ${BUILD_ARCH}_${SDK_ARCH}_${SDK_OS} \
76 ${BUILD_ARCH}_${TARGET_ARCH} \ 77 ${BUILD_ARCH}_${TARGET_ARCH} \
77 ${SDK_ARCH}_${SDK_OS} \ 78 ${SDK_ARCH}_${SDK_OS} \
@@ -80,6 +81,7 @@ SSTATE_ARCHS = " \
80 ${PACKAGE_ARCH} \ 81 ${PACKAGE_ARCH} \
81 ${PACKAGE_EXTRA_ARCHS} \ 82 ${PACKAGE_EXTRA_ARCHS} \
82 ${MACHINE_ARCH}" 83 ${MACHINE_ARCH}"
84SSTATE_ARCHS[vardepsexclude] = "ORIGNATIVELSBSTRING"
83 85
84SSTATE_MANMACH ?= "${SSTATE_PKGARCH}" 86SSTATE_MANMACH ?= "${SSTATE_PKGARCH}"
85 87
@@ -121,6 +123,8 @@ SSTATE_HASHEQUIV_REPORT_TASKDATA[doc] = "Report additional useful data to the \
121python () { 123python () {
122 if bb.data.inherits_class('native', d): 124 if bb.data.inherits_class('native', d):
123 d.setVar('SSTATE_PKGARCH', d.getVar('BUILD_ARCH', False)) 125 d.setVar('SSTATE_PKGARCH', d.getVar('BUILD_ARCH', False))
126 if d.getVar("PN") == "pseudo-native":
127 d.appendVar('SSTATE_PKGARCH', '_${ORIGNATIVELSBSTRING}')
124 elif bb.data.inherits_class('crosssdk', d): 128 elif bb.data.inherits_class('crosssdk', d):
125 d.setVar('SSTATE_PKGARCH', d.expand("${BUILD_ARCH}_${SDK_ARCH}_${SDK_OS}")) 129 d.setVar('SSTATE_PKGARCH', d.expand("${BUILD_ARCH}_${SDK_ARCH}_${SDK_OS}"))
126 elif bb.data.inherits_class('cross', d): 130 elif bb.data.inherits_class('cross', d):
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index 4ea29cb..adfe2e4 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -434,7 +434,7 @@ def find_sstate_manifest(taskdata, taskdata2, taskname, d, multilibcache):
434 d2 = multilibcache[variant] 434 d2 = multilibcache[variant]
435 435
436 if taskdata.endswith("-native"): 436 if taskdata.endswith("-native"):
437 pkgarchs = ["${BUILD_ARCH}"] 437 pkgarchs = ["${BUILD_ARCH}", "${BUILD_ARCH}_${ORIGNATIVELSBSTRING}"]
438 elif taskdata.startswith("nativesdk-"): 438 elif taskdata.startswith("nativesdk-"):
439 pkgarchs = ["${SDK_ARCH}_${SDK_OS}", "allarch"] 439 pkgarchs = ["${SDK_ARCH}_${SDK_OS}", "allarch"]
440 elif "-cross-canadian" in taskdata: 440 elif "-cross-canadian" in taskdata: