Skip to contentSkip to conversation

Revert "uninative: Don't use single sstate for pseudo-native"

PATCH In review Chen Qi 2 participants 3 messages Mar 10, 2021 – Mar 11, 2021

lore
Share & tools
lore

Chen Qi

author
#0 lore raw

PATCH 1/1 Revert "uninative: Don't use single sstate for pseudo-native"

This reverts commit 3ecf5d9692fec97b37af6a4e6c747a4e2c2ca292.

The above commit causes a regression, making eSDK not able to be installed on a different host. For example, build eSDK on ubuntu18 and install the eSDK on ubunt20, then we'll get an error at installation time. This is because the pseudo-native's sstate cache could not be shared among different distros.

In addition, according to the pseudo recipe, pseudo-native always has attr support compiled in. And if people change the PSEUDO_EXTRA_OPTS, the signature should also change.

---
 meta/classes/base.bbclass   | 1 -
 meta/classes/sstate.bbclass | 4 ----
 meta/lib/oe/sstatesig.py    | 2 +-
 3 files changed, 1 insertion(+), 6 deletions(-)
meta/classes/base.bbclass +0 -1
index b4160402f0..df7878c53d 100644
@@ -231,7 +231,6 @@ python base_eventhandler() {
     if isinstance(e, bb.event.ConfigParsed):
         if not d.getVar("NATIVELSBSTRING", False):
             d.setVar("NATIVELSBSTRING", lsb_distro_identifier(d))
-        d.setVar("ORIGNATIVELSBSTRING", d.getVar("NATIVELSBSTRING", False))
         d.setVar('BB_VERSION', bb.__version__)
 
     # There might be no bb.event.ConfigParsed event if bitbake server is
meta/classes/sstate.bbclass +0 -4
index f579168162..c1be723b87 100644
@@ -72,7 +72,6 @@ BB_HASHFILENAME = "False ${SSTATE_PKGSPEC} ${SSTATE_SWSPEC}"
 
 SSTATE_ARCHS = " \
     ${BUILD_ARCH} \
-    ${BUILD_ARCH}_${ORIGNATIVELSBSTRING} \
     ${BUILD_ARCH}_${SDK_ARCH}_${SDK_OS} \
     ${BUILD_ARCH}_${TARGET_ARCH} \
     ${SDK_ARCH}_${SDK_OS} \
@@ -81,7 +80,6 @@ SSTATE_ARCHS = " \
     ${PACKAGE_ARCH} \
     ${PACKAGE_EXTRA_ARCHS} \
     ${MACHINE_ARCH}"
-SSTATE_ARCHS[vardepsexclude] = "ORIGNATIVELSBSTRING"
 
 SSTATE_MANMACH ?= "${SSTATE_PKGARCH}"
 
@@ -123,8 +121,6 @@ SSTATE_HASHEQUIV_REPORT_TASKDATA[doc] = "Report additional useful data to the \
 python () {
     if bb.data.inherits_class('native', d):
         d.setVar('SSTATE_PKGARCH', d.getVar('BUILD_ARCH', False))
-        if d.getVar("PN") == "pseudo-native":
-            d.appendVar('SSTATE_PKGARCH', '_${ORIGNATIVELSBSTRING}')
     elif bb.data.inherits_class('crosssdk', d):
         d.setVar('SSTATE_PKGARCH', d.expand("${BUILD_ARCH}_${SDK_ARCH}_${SDK_OS}"))
     elif bb.data.inherits_class('cross', d):
meta/lib/oe/sstatesig.py +1 -1
index 6cd6e11acc..744dbef199 100644
@@ -434,7 +434,7 @@ def find_sstate_manifest(taskdata, taskdata2, taskname, d, multilibcache):
         d2 = multilibcache[variant]
 
     if taskdata.endswith("-native"):
-        pkgarchs = ["${BUILD_ARCH}", "${BUILD_ARCH}_${ORIGNATIVELSBSTRING}"]
+        pkgarchs = ["${BUILD_ARCH}"]
     elif taskdata.startswith("nativesdk-"):
         pkgarchs = ["${SDK_ARCH}_${SDK_OS}", "allarch"]
     elif "-cross-canadian" in taskdata:
Signature · 1 line
2.17.1
#1 lore raw
Quoted 11 lines · Chen Qi

This reverts commit 3ecf5d9692fec97b37af6a4e6c747a4e2c2ca292.

The above commit causes a regression, making eSDK not able to be installed on a different host. For example, build eSDK on ubuntu18 and install the eSDK on ubunt20, then we'll get an error at installation time. This is because the pseudo-native's sstate cache could not be shared among different distros.

In addition, according to the pseudo recipe, pseudo-native always has attr support compiled in. And if people change the PSEUDO_EXTRA_OPTS, the signature should also change.

The issue is the code in ports/linux/subports, I had evidence that those values differ depending upon which OS pseudo-native was built upon.

We'd need to be able to show that those values don't differ in order to be able to revert this change.

Ensuring struct statx x is available for example was a harder problem. I didn't really want to hardcode chunks of libc into pseudo.

Cheers,

Richard

author
#2 lore raw
Quoted 9 lines · Richard Purdie
Quoted 8 lines · Chen Qi

This reverts commit 3ecf5d9692fec97b37af6a4e6c747a4e2c2ca292.

The above commit causes a regression, making eSDK not able to be installed on a different host. For example, build eSDK on ubuntu18 and install the eSDK on ubunt20, then we'll get an error at installation time. This is because the pseudo-native's sstate cache could not be shared among different distros.

Quoted 5 lines
Quoted 3 lines

In addition, according to the pseudo recipe, pseudo-native always has attr support compiled in. And if people change the PSEUDO_EXTRA_OPTS, the signature should also change.

The issue is the code in ports/linux/subports, I had evidence that those values differ depending upon which OS pseudo-native was built upon.

Hi Peter,

Do you have some idea how to fix this problem?
Are the checks in ports/linux/subports the only place that could lead to different build results on different hosts?

Best Regards,
Chen Qi

Quoted 12 lines

We'd need to be able to show that those values don't differ in order to be able to revert this change.

Ensuring struct statx x is available for example was a harder problem. I didn't really want to hardcode chunks of libc into pseudo.

Cheers,

Richard