-
-
Notifications
You must be signed in to change notification settings - Fork 292
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
Invalid symbolic link ~/.cache/pex/unzipped_pexes/<hash>/.bootstrap on Fedora Silverblue/Kinoite 41 #2634
Comments
For example #2626 was only released in Pex 2.27.1 2 weeks ago: https://github.com/pex-tool/pex/releases/tag/v2.27.1 Surely the Pants folks haven't updated Pants and scie-pants to that already. |
@tymonx this was in fact fixed in #2626 but you need Pants 2.25.0.dev3 or newer to get that fix. See the example docker session here: pantsbuild/pants#21799 (comment) |
@tymonx I'm going to close this as an answered question since pantsbuild/pants#21799 (comment) proves the fixes in #2572 and #2626 do work. You just may have to wait awhile on Pants to get a stable 2.25 release out if you're not willing to use a Pants 2.25 dev release. |
@jsirois You are right. It uses older version of
|
@jsirois I can confirm. If fixes the issue when changing [GLOBAL]
pants_version = "2.25.0.dev3" |
Great - thanks for confirming @tymonx. |
The pants project uses pex and because of that it doesn't work on Linux distributions like Fedora Kinote or Silverblue (Atomic OS). Because of
~/
or/home/${USER}/
that is a symbolic link to/var/home/${USER}/
.pex
creates a symbolic link~/.cache/pex/unzipped_pexes/<hash>/.bootstrap
pointing to../../../../../../var/home/${USER}/.cache/pex/bootstraps/<hash>
. The main root cause is relative content of that created symbolic link. Ifpex
file is run when current working directory is part of/home/${USER}/
then unpacking procedure fails with raised Python exception from~/.cache/pex/unzipped_pexes/<hash>/__main__.py
file:Because of invalid symbolic link added to
sys.path[0]
by above__main__.py
file, the Pythonpex
module cannot be found by Python interpreter.It impacts pants: pantsbuild/pants#21799
Related issues: #2572 and #2626 Unfortunately it doesn't fix above issue for pants
2.31.1
.It looks like that fix should be fair easy to implement (using
realpath
).The text was updated successfully, but these errors were encountered: