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: Don't die on PermissionError during chmod #1073

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mweinelt
Copy link

@mweinelt mweinelt commented Mar 11, 2024

The user might not have permissions to change permissions on the executables. Aborting in that case seems premature, since the permissions might be sufficient after all.

Seen on nixpkgs, where the cmake execcutable is immutable.

cffsubr> Traceback (most recent call last):
cffsubr>   File "/build/cffsubr-0.3.0/external/afdko/setup.py", line 222, in <module>
cffsubr>     main()
cffsubr>   File "/build/cffsubr-0.3.0/external/afdko/setup.py", line 172, in main
cffsubr>     setup(name="afdko",
cffsubr>   File "/nix/store/dg9b2drwhvdfxp9gmpyiav1isl6hji9d-python3.11-scikit-build-0.17.6/lib/python3.11/site-packages/skbuild/setuptools_wrap.py", line 636, in setup
cffsubr>     os.chmod(executable, permissions)
cffsubr> PermissionError: [Errno 1] Operation not permitted: '/nix/store/vzr2v0mq6sx5vi301xxwf8i4nl9nlhxv-cmake-3.28.3/bin/cmake'
cffsubr> error: running '/nix/store/vhlk4r8ralh744khcy3vy47ijw5rvpw5-python3-3.11.8/bin/python3.11 setup.py build --build-scripts build/bin' command failed

The user might not have permissions to change permissions on the
executables. Aborting in that case seems premature, since the permissions
might be sufficient after all.

Signed-off-by: Martin Weinelt <hexa@darmstadt.ccc.de>
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.

None yet

1 participant