rose icon indicating copy to clipboard operation
rose copied to clipboard

rose app-upgrade: file/ modified multiple times when there are optional configurations

Open matthewrmshin opened this issue 6 years ago • 0 comments

Issue reported via email.

Sometimes an upgrade macro needs to modify something in the file/ subdirectory of an app (e.g. file/fcm-make.cfg), which generally means directly accessing the file through Python as Rose doesn't have any nice means of changing the contents of the file/ directory.

A couple of years ago this worked fine, but now that Rose loops through the macro multiple times when there are optional configurations present, it means the macro ends up trying to modify the file N+1 times, where N is the number of optional configurations. Needless to say this can be disastrous in some circumstances, ...

Please can we have a 'safe' method of accessing the contents of the file/ subdirectory in an upgrade macro? It doesn't have to be very clever, it just needs to do whatever it's doing once and once only.

matthewrmshin avatar Apr 20 '18 13:04 matthewrmshin