Framework: fix for wizard file permissions #5608
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
In some builds that included wizard UI files based on shell scripts, the shell scripts didn't execute during the installation wizard under DSM6 because they lacked the execute bit set (#5524 (comment) and #5455 (comment)). This issue occurred because the current
spksrc.spk.mk
set the execute bit as part of a block that evaluated the contents of the parent folder based on wildcards. However, for Makefiles, wildcards are evaluated during parsing and are not re-evaluated when the containing statement is executed (see: The Trouble with $(wildcard)).To solve this issue, we define a new variable calledWIZARD_FILE_LIST
that generates a list of files in the directory. Then we reference this variable from the wizards target in anif
statement to check if the variable has a value. This approach ensures that the variable has the correct value when evaluated, and we no longer rely on wildcards to evaluate the contents of the parent folder.To solve this issue, the code was modified to check the existence of the
DSM_WIZARDS_DIR
directory instead. If theWIZARDS_DIR
variable was already evaluated as not null, this directory would exist, ensuring that the files within it are consistently processed for file permissions. This approach removes the reliance on wildcards to evaluate the contents of the parent folder and ensures that the shell scripts have the correct file permissions during the installation wizard.Follow up of #5383
Fixes #
Checklist
all-supported
completed successfullyType of change