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

Changing file permission in a working copy breaks prebuild #228

Open
MartinDix opened this issue Apr 22, 2016 · 1 comment
Open

Changing file permission in a working copy breaks prebuild #228

MartinDix opened this issue Apr 22, 2016 · 1 comment
Milestone

Comments

@MartinDix
Copy link
Contributor

Something odd I stumbled on while messing with file permissions trying to understand #226.

If the permissions of a file in a working copy are different to the permissions in the inherited build the extraction fails with a confusing error message.

it's easier to demonstrate this by changing the permissions of a file in the working copy but the same thing happens if the permissions in the extract directory of the inherited build are changed.

I've added a new test fcm2_inherit_wcopy_perms in MartinDix@c4c686f

This is based on fcm2_add_file_inherit but uses a working copy rather than a branch.

The permissions of a working copy file are changed with

chmod o-r $BASE_DIR/add_file/subroutine/hello_sub.F90

Then

./run_tests -c 2016.02.0-6-gc4c686f -f -g -2

and fcm2_inherit_wcopy_perms fails with error

[FAIL] /scratch/users/name/fcm_test_suite/control/fcm2_inherit_wcopy_perms/extract/test_suite/subroutine/hello_sub.F90: cannot create
[FAIL] No such file or directory

.For some reason _target_update in Extract.pm is checking whether the file permissions match,
e.g. https://github.com/metomi/fcm/blob/master/lib/FCM/System/Make/Extract.pm#L1095. I don't understand why this is necessary, but if it is the error message should at least be more specific.

@matthewrmshin
Copy link
Member

@MartinDix If I remember correctly, the permission check is put in place to detect changes to executable permission.

@matthewrmshin matthewrmshin removed their assignment Sep 4, 2023
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

No branches or pull requests

2 participants