fcm icon indicating copy to clipboard operation
fcm copied to clipboard

Changing file permission in a working copy breaks prebuild

Open MartinDix opened this issue 8 years ago • 1 comments

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 https://github.com/MartinDix/fcm/commit/c4c686fcbca5afe0a68e5aba16890b76cb6a82f6

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.

MartinDix avatar Apr 22 '16 04:04 MartinDix