bitbake: remove /usr from pseudo ignore paths
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): CADVsX8-dMLvuccRjzU73=-reDjEBRq5PZZ+S6ZeugSvTy-iqog@mail.gmail.com
PATCH 1/1 bitbake: remove /usr from pseudo ignore paths
Allow the Yocto's building tree to be placed under /usr.
Relevant issue: https://github.com/openbmc/openbmc/issues/3724
--- meta/conf/bitbake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/conf/bitbake.conf +0 -1
@@ -685,7 +685,7 @@ SRC_URI = "" PSEUDO_LOCALSTATEDIR ?= "${WORKDIR}/pseudo/" PSEUDO_PASSWD ?= "${STAGING_DIR_TARGET}:${PSEUDO_SYSROOT}" PSEUDO_SYSROOT = "${COMPONENTS_DIR}/${BUILD_ARCH}/pseudo-native" -PSEUDO_IGNORE_PATHS =
"/usr/,/etc/,/lib,/dev/,${T},${WORKDIR}/recipe-sysroot,${SSTATE_DIR},${STAMPS_DIR},${WORKDIR}/pkgdata-sysroot,${TMPDIR}/sstate-control,${DEPLOY_DIR},${WORKDIR}/deploy-,${TMPDIR}/buildstats,${WORKDIR}/sstate-build-package_,${WORKDIR}/sstate-install-package_,${WORKDIR}/sstate-build-image_complete,${TMPDIR}/sysroots-components,${BUILDHISTORY_DIR},${TMPDIR}/pkgdata,${TOPDIR}/cache,${COREBASE}/scripts,${CCACHE_DIR}" +PSEUDO_IGNORE_PATHS = "/etc/,/lib,/dev/,${T},${WORKDIR}/recipe-sysroot,${SSTATE_DIR},${STAMPS_DIR},${WORKDIR}/pkgdata-sysroot,${TMPDIR}/sstate-control,${DEPLOY_DIR},${WORKDIR}/deploy-,${TMPDIR}/buildstats,${WORKDIR}/sstate-build-package_,${WORKDIR}/sstate-install-package_,${WORKDIR}/sstate-build-image_complete,${TMPDIR}/sysroots-components,${BUILDHISTORY_DIR},${TMPDIR}/pkgdata,${TOPDIR}/cache,${COREBASE}/scripts,${CCACHE_DIR}"
export PSEUDO_DISABLED = "1"
#export PSEUDO_PREFIX = "${STAGING_DIR_NATIVE}${prefix_native}"
Signature · 1 line
2.29.2.729.g45daf8777d-goog
Quoted 8 lines · Anton Kachalov via lists.openembedded.org
Allow the Yocto's building tree to be placed under /usr.
Relevant issue: https://github.com/openbmc/openbmc/issues/3724
Signed-off-by Anton D. Kachalov <[email protected]>---
meta/conf/bitbake.conf | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)
Do you really need to build under /usr? We probably should make this more of a hard error if someone attempts it. I commented on the issue, could you just remove this from PSEUDO_IGNORE_PATHS locally if you really have to use /usr?
Cheers,
Richard
Hello, Richard.
Yes, for various reasons we can not move out from /usr/local. Before the change it works smoothly and we didn't notice about any kind of performance issues.
May be we can explicitly add various standard subdirs under /usr excluding /usr/local?
Quoted 21 lines · On Thu, Jan 7, 2021, 23:16 Richard Purdie <…
Quoted 8 lines · Anton Kachalov via lists.openembedded.org
Allow the Yocto's building tree to be placed under /usr.
Relevant issue: https://github.com/openbmc/openbmc/issues/3724
Signed-off-by Anton D. Kachalov <[email protected]>--- meta/conf/bitbake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Do you really need to build under /usr? We probably should make this more of a hard error if someone attempts it. I commented on the issue, could you just remove this from
PSEUDO_IGNORE_PATHSlocally if you really have to use /usr?Cheers,
Richard
Quoted 6 lines · Anton Kachalov
Hello, Richard.
Yes, for various reasons we can not move out from/usr/local. Before the change it works smoothly and we didn't notice about any kind of performance issues.
May be we can explicitly add various standard subdirs under /usr excluding/usr/local?
Can you add local config like:
PSEUDO_IGONRE_PATHS_remove = "/usr/,"
which should allow things to work for you?
Cheers,
Richard
Quoted 9 lines
-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of Richard Purdie
Sent: den 8 januari 2021 09:27
To: Anton Kachalov <[email protected]>
Cc: [email protected]
Subject: Re: [OE-core] [poky][PATCH] bitbake: remove /usr from pseudo ignore paths
Quoted 3 lines
Quoted 2 lines · Anton Kachalov
Hello, Richard.
Yes, for various reasons we can not move out from/usr/local.
Using a build directory anywhere under /usr sounds like a very unusual setup and I do not think it is a situation that warrants special treatment in the common configuration. Workarounds are better done in the local environment.
Quoted 4 lines
Quoted 4 lines
Before the change it works smoothly and we didn't notice about any kind of performance issues.
May be we can explicitly add various standard subdirs under /usr excluding/usr/local?
I believe it would be hard to maintain a suitable list of subdirectories of /usr (including /usr/local) that pseudo should ignore. However, do we actually know if pseudo is normally accessing paths under /usr, or was it just added as a "pseudo should never care about anything here so we may as well add it"?
Quoted 5 lines
Can you add local config like:
PSEUDO_IGONRE_PATHS_remove= "/usr/,"which should allow things to work for you?
Correct me if I am wrong, but AFAIK you cannot use the _remove operator to remove a part of a string. It only works on space separated words. You will have to redefine the entire PSEUDO_IGONRE_PATHS to remove any parts of it.
This is a drawback of using a list in a bitbake variable that is separated using something other than spaces. I guess commas were chosen as separator for this variable since spaces are more common (if still rare) in paths than commas, but it causes problems like this.
Quoted 4 lines
Cheers,
Richard
//Peter
Hello,
nope, setting the entire PSEUDO_IGNORE_PATHS without "/usr" doesn't work. The do_install task fails with error code 134 without any log file. Neither temp/run.do_install file exists. The pseudo.log doesn't have any errors.
Quoted 53 lines · Peter Kjellerstedt
Quoted 9 lines
-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of Richard Purdie
Sent: den 8 januari 2021 09:27
To: Anton Kachalov <[email protected]>
Cc: [email protected]
Subject: Re: [OE-core] [poky][PATCH] bitbake: remove /usr from pseudo ignore pathsQuoted 3 lines
Quoted 2 lines · Anton Kachalov
Hello, Richard.
Yes, for various reasons we can not move out from/usr/local.Using a build directory anywhere under /usr sounds like a very unusual setup and I do not think it is a situation that warrants special treatment in the common configuration. Workarounds are better done in the local environment.
Quoted 4 lines
Quoted 4 lines
Before the change it works smoothly and we didn't notice about any kind of performance issues.
May be we can explicitly add various standard subdirs under /usr excluding/usr/local?I believe it would be hard to maintain a suitable list of subdirectories of /usr (including
/usr/local) that pseudo should ignore. However, do we actually know if pseudo is normally accessing paths under /usr, or was it just added as a "pseudo should never care about anything here so we may as well add it"?Quoted 5 lines
Can you add local config like:
PSEUDO_IGONRE_PATHS_remove= "/usr/,"which should allow things to work for you?
Correct me if I am wrong, but AFAIK you cannot use the
_removeoperator to remove a part of a string. It only works on space separated words. You will have to redefine the entirePSEUDO_IGONRE_PATHSto remove any parts of it.This is a drawback of using a list in a bitbake variable that is separated using something other than spaces. I guess commas were chosen as separator for this variable since spaces are more common (if still rare) in paths than commas, but it causes problems like this.
Quoted 4 lines
Cheers,
Richard
//Peter
Quoted 4 lines · Anton Kachalov
nope, setting the entire
PSEUDO_IGNORE_PATHSwithout "/usr" doesn't work. Thedo_installtask fails with error code 134 without any log file. Neither temp/run.do_install file exists. The pseudo.log doesn't have any errors.
Right, Peter is correct and _remove is space delimited, the variable is comma delimited. Sorry, I'm getting confused.
There is the rather uglier:
PSEUDO_IGNORE_PATHS := "${@d.getVar('PSEUDO_IGNORE_PATHS').replace('/usr/,','')}"
which should work (I did test this time!).
Cheers,
Richard
Quoted 6 lines · Richard Purdie
Quoted 4 lines · Anton Kachalov
nope, setting the entire
PSEUDO_IGNORE_PATHSwithout "/usr" doesn't work. Thedo_installtask fails with error code 134 without any log file. Neither temp/run.do_install file exists. The pseudo.log doesn't have any errors.
Quoted 8 lines
Right, Peter is correct and
_removeis space delimited, the variable is comma delimited. Sorry, I'm getting confused.There is the rather uglier:
PSEUDO_IGNORE_PATHS:= "${@d.getVar('PSEUDO_IGNORE_PATHS').replace('/usr/,','')}"which should work (I did test this time!).
Thinking more, this is safer:
PSEUDO_IGNORE_PATHS := "${@d.getVar('PSEUDO_IGNORE_PATHS', False).replace('/usr/,','')}"
I did test it parses and gave the right value with bitbake -e however I not expanding it will be much safer as I suspect the first version won't work in recipe context at build time.
Cheers,
Richard
Perhaps, I'm doing something wrong, but setting this variable in build/conf/local.conf makes packages fail to build (do_install): only those which fail with pseudo before (linux-libc-headers and base-files).
Quoted 31 lines · Richard Purdie
Quoted 6 lines · Richard Purdie
Quoted 4 lines · Anton Kachalov
nope, setting the entire
PSEUDO_IGNORE_PATHSwithout "/usr" doesn't work. Thedo_installtask fails with error code 134 without any log file. Neither temp/run.do_install file exists. The pseudo.log doesn't have any errors.Quoted 6 lines
Right, Peter is correct and
_removeis space delimited, the variable is comma delimited. Sorry, I'm getting confused.There is the rather uglier:
PSEUDO_IGNORE_PATHS:="${@d.getVar('PSEUDO_IGNORE_PATHS').replace('/usr/,','')}"
Quoted 2 lines
which should work (I did test this time!).
Thinking more, this is safer:
PSEUDO_IGNORE_PATHS:= "${@d.getVar('PSEUDO_IGNORE_PATHS', False).replace('/usr/,','')}"I did test it parses and gave the right value with bitbake -e however I not expanding it will be much safer as I suspect the first version won't work in recipe context at build time.
Cheers,
Richard