You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
python-exec triggers a warning when starting ansible-lint #12
Whenever I run ansible-lint on Gentoo system, I get a warning:
WARNING: PATH altered to include /usr/lib/python-exec/python3.10 :: This is usually a sign of broken local setup, which can cause unexpected behaviors.
I'm not convinced this is generally a good idea, and it is definitely a change in behavior.
Currently, if direct executable doesn't support preferred impl, other programs will still run through python-exec and run with preferred impl. With this change, the non-preferred impl will be forced for everything.
I'm not convinced as well. It's possible to patch ansible-lint but I failed to think of a good way to detect that program was running with the help of python-exec.
It has never been entirely clear to me why python-exec supports its own use as a shebang to smartly detect the preferred EPYTHON but then uses that facility to execute a launcher script which reads and exec()'s the real script in combination with argv mangling.
One possible solution to this reported case would be to stop doing that, and simply inject itself into the existing script's shebang directly in /usr/bin. What would be the downside of such an approach? (I assume that this must have been considered at some point and rejected, but I haven't seen any documentation on why.)
Activity
mgorny commentedon Sep 17, 2024
I'm not convinced this is generally a good idea, and it is definitely a change in behavior.
Currently, if direct executable doesn't support preferred impl, other programs will still run through python-exec and run with preferred impl. With this change, the non-preferred impl will be forced for everything.
pva commentedon Sep 17, 2024
I'm not convinced as well. It's possible to patch ansible-lint but I failed to think of a good way to detect that program was running with the help of python-exec.
eli-schwartz commentedon Sep 18, 2024
It has never been entirely clear to me why python-exec supports its own use as a shebang to smartly detect the preferred EPYTHON but then uses that facility to execute a launcher script which reads and exec()'s the real script in combination with argv mangling.
One possible solution to this reported case would be to stop doing that, and simply inject itself into the existing script's shebang directly in /usr/bin. What would be the downside of such an approach? (I assume that this must have been considered at some point and rejected, but I haven't seen any documentation on why.)
mgorny commentedon Sep 18, 2024
Please ask in plain English.