diff mbox series

[v3] bitbake.conf: pseudo to ignore vim and less config files

Message ID 20250505130830.995042-1-mikko.rapeli@linaro.org
State New
Headers show
Series [v3] bitbake.conf: pseudo to ignore vim and less config files | expand

Commit Message

Mikko Rapeli May 5, 2025, 1:08 p.m. UTC
vim and less always write to these files in users home directory.
Using vim and less via pseudo in "bitbake -c devshell recipe" and
outside of pseudo triggers pseudo aborts which makes interactive
use of devshell difficult. Fixes vim and less crashes and related
pseudo log entries:

inode mismatch: '/home/builder/.viminfo' ino 33270730 in db, 33269736 in request.
inode mismatch: '/home/builder/.lesshst' ino 33270625 in db, 33270730 in request.

Ignoring all files with ${HOME}/. in path fails since tools seem
to be using these paths, e.g. trusted-firmware-a from meta-arm.

Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
---
 meta/conf/bitbake.conf | 2 ++
 1 file changed, 2 insertions(+)

v3: back to .less and .vim paths due to failures from trusted-firmware-a in meta-arm,
    added comment

v2: ignore all files from ${HOME}/. instead of just ${HOME}/.vim and ${HOME}/.less
    https://lists.openembedded.org/g/openembedded-core/message/215991

v1: https://lists.openembedded.org/g/openembedded-core/message/215986

Comments

Richard Purdie May 5, 2025, 1:29 p.m. UTC | #1
On Mon, 2025-05-05 at 16:08 +0300, Mikko Rapeli via lists.openembedded.org wrote:
> vim and less always write to these files in users home directory.
> Using vim and less via pseudo in "bitbake -c devshell recipe" and
> outside of pseudo triggers pseudo aborts which makes interactive
> use of devshell difficult. Fixes vim and less crashes and related
> pseudo log entries:
> 
> inode mismatch: '/home/builder/.viminfo' ino 33270730 in db, 33269736 in request.
> inode mismatch: '/home/builder/.lesshst' ino 33270625 in db, 33270730 in request.
> 
> Ignoring all files with ${HOME}/. in path fails since tools seem
> to be using these paths, e.g. trusted-firmware-a from meta-arm.
> 
> Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
> ---
>  meta/conf/bitbake.conf | 2 ++
>  1 file changed, 2 insertions(+)
> 
> v3: back to .less and .vim paths due to failures from trusted-firmware-a in meta-arm,
>     added comment

What paths are they using exactly? That sounds odd...

Cheers,

Richard
Mikko Rapeli May 5, 2025, 1:47 p.m. UTC | #2
Hi,

On Mon, May 05, 2025 at 02:29:57PM +0100, Richard Purdie wrote:
> On Mon, 2025-05-05 at 16:08 +0300, Mikko Rapeli via lists.openembedded.org wrote:
> > vim and less always write to these files in users home directory.
> > Using vim and less via pseudo in "bitbake -c devshell recipe" and
> > outside of pseudo triggers pseudo aborts which makes interactive
> > use of devshell difficult. Fixes vim and less crashes and related
> > pseudo log entries:
> > 
> > inode mismatch: '/home/builder/.viminfo' ino 33270730 in db, 33269736 in request.
> > inode mismatch: '/home/builder/.lesshst' ino 33270625 in db, 33270730 in request.
> > 
> > Ignoring all files with ${HOME}/. in path fails since tools seem
> > to be using these paths, e.g. trusted-firmware-a from meta-arm.
> > 
> > Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
> > ---
> > �meta/conf/bitbake.conf | 2 ++
> > �1 file changed, 2 insertions(+)
> > 
> > v3: back to .less and .vim paths due to failures from trusted-firmware-a in meta-arm,
> > ��� added comment
> 
> What paths are they using exactly? That sounds odd...

With ${HOME}/. in ignored paths, I have a lot of recipes now installing non-root
owned files and failing qa checks. Sadly this propagated to sstate cache.
List of affected meta-arm recipes from small firmware builds:

trusted-firmware-a
ts-sp-block-storage
ts-sp-attestation
ts-sp-crypto
ts-sp-smm-gateway
ts-sp-storage
ts-sp-its

I tried PSEUDO_VERBOSE flags to figure out what is going on but that did
not help. I can try again if you have some hints on how to debug this
but it's clear that very bad things(tm) happen if ${HOME}/. is in pseudo
ignored paths. And I really don't want to dive into various broken
tools/toolchains just because I want less and vim to not crash inside
devshell all the time. Common things behind these recipes are
makefiles, CMake, dtc and custom python scripts.

Cheers,

-Mikko
diff mbox series

Patch

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index b1dae17267..1de22ea868 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -748,6 +748,8 @@  PSEUDO_IGNORE_PATHS = "/usr/,/etc/,/lib,/dev/,/run/,${T},${WORKDIR}/recipe-sysro
 PSEUDO_IGNORE_PATHS .= ",${TMPDIR}/sstate-control,${TMPDIR}/buildstats,${TMPDIR}/sysroots-components,${TMPDIR}/pkgdata"
 PSEUDO_IGNORE_PATHS .= ",${WORKDIR}/deploy-,${WORKDIR}/sstate-build-package_,${WORKDIR}/sstate-install-package_,${WORKDIR}/pkgdata-sysroot"
 PSEUDO_IGNORE_PATHS .= ",${DEPLOY_DIR},${BUILDHISTORY_DIR},${TOPDIR}/cache,${COREBASE}/scripts,${CCACHE_DIR},${S},${B}"
+# Ignore all files and directories with path starting with .vim/.less in HOME
+PSEUDO_IGNORE_PATHS .= ",${HOME}/.vim,${HOME}/.less"
 
 export PSEUDO_DISABLED = "1"
 #export PSEUDO_PREFIX = "${STAGING_DIR_NATIVE}${prefix_native}"