Fix wrong ordering of files in rpm when using feature to generate intermediate directories #90
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.
Hello!
First of all, I apologize for overlooking the bug in my last merge request (#86).
To fix the bug with the wrong order of the files in the RPM, I have revised the implementation of the feature to generate automatically missing intermediate directories.
As mentioned in Issue #85, the output of the predefined rpm querys are somehow missleading, because they do not reflect the order of installation. Therefore, I have updated the tests with a custom rpm query to get the correct order of installtion.
Unlike in the original implementation, I now add the missing intermediate folders of an entry to the RPM
BuilderContext
before the corresponding entry. So I get the correct sequence of files and directories for installation.The new approach has the disadvantage that the order of the entries in the plugin is relevant, when using this feature.
E.g. the following Configuration will fail with
Duplicate entry: ./opt/mycompany/myapp
because after processing the first entry, the directory/opt/mycompany/myapp
is already added to the RPMBuilderContext
.To fix this, you have to change the odering of the entries.
I look forward to your feedback.
Edit: As already mentioned in issue #14, the ordering of the entries has always been relevant. So it is not really a new "disadvantage".