Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix container scanner paths when a different mountpoint is used #5

Merged

Conversation

deribaucourt
Copy link
Member

No description provided.

@deribaucourt deribaucourt force-pushed the relative-scanner branch 4 times, most recently from 86fa0d5 to 796eeda Compare December 6, 2023 10:17
If a docker container commandWrapper is used, the workdir may be
different from the host system. This patch resolves the path to the
host system by finding the inode of the host workdir in the container.
In the case of a docker container commandWrapper, the env script
may exist in a different location than the one on the host. So
don't check for the env script if a command wrapper is set.
When going through a commandWrapper, some logs may be injected. This is
the case with poky/crops. This patch fixes the parsing of the inode
number by using a regex.
This patch adds a new setting `bitbake.shellEnv` which allows to set
environment variables before running the BitBake command. This allows
customizing oe-init-build-env but also kas, cqfd and other build tools.
This test verifies callink bitbake from a docker container with a
complex mount point.
If the mount point was a parent directory of the bitbake.workingDir, and
the layers were symlinks to directories outside of the workingDir, the
layer resolution would fail.

We now itterate on the host parent directories inodes also.
This greatly speeds up the scanner when we are looking for corresponding
container mount points. The scanner now runs only one find command
instead of one per directory level in the layer path.
@deribaucourt deribaucourt marked this pull request as ready for review December 6, 2023 11:08
@deribaucourt deribaucourt requested review from idillon-sfl and WilsonZiweiWang and removed request for idillon-sfl December 6, 2023 11:08
@moh60 moh60 self-requested a review December 8, 2023 03:04
Copy link
Collaborator

@moh60 moh60 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@deribaucourt deribaucourt merged commit 66ce04a into yoctoproject:staging Dec 8, 2023
1 check passed
@deribaucourt deribaucourt deleted the relative-scanner branch December 8, 2023 08:15
Freed-Wu pushed a commit to Freed-Wu/coc-bitbake that referenced this pull request Mar 3, 2024
Feat: Add definition on hover for variables defined by BitBake
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants