cocci: Fix Python path for coccilib #24430
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Trying to run the coccinelle checks locally (with the coccicheck image from DockerHub, or by rebuilding it locally) fails with the current error:
It so happens that it has also been failing silently in the CI for a while! Logging in to the container, we can see:
This can be trivially addressed by adding the relevant module path to the
$PYTHONPATH
environment variable in the Dockerfile.The coccinelle checks used to work, but now fail on multiple branches. The root cause for the issue is unknown at this time.
This commit was split off of #24392, so we can merge the Dockerfile change, then generate a new image from the repo, and at last fix the script and coccinelle reports and update the image references (see initial PR). See also that PR as proof that setting
$PYTHONPATH
does fix the issue.