Skip to content

Changing file permission in a working copy breaks prebuild #228

@MartinDix

Description

@MartinDix

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions