Conversation
| version = version.replaceAll(versionSubstitution.search, versionSubstitution.replace); | ||
| } | ||
| } | ||
| return new RpmVersion(this.epoch, version, this.release); |
There was a problem hiding this comment.
If the version is invalid, it could eventually be detected here. Technically, the output filename doesn't have to be a valid RpmVersion, which means we would have to change RpmFileNameProvider to use String instead of RpmVersion, or it would fail at that point with using the non-transformed version (since makeVersion called with false there).
There was a problem hiding this comment.
I didn't want to change the output file name as that is what is used in maven storage (and is legal). I'm guessing you're referring to eclipse-packager/packager#76 which would break rpm-builder here if an invalid version is used ; I'm beginning to think the validation might actually cause more problems that it solves. Note also RpmFileNameProvider uses the RpmVersion to extract the release as well as the version.
The reason for this enhancement is that if we have a typical RH version e.g.
1.1.0.redhat-00001then that utilises illegal characters in the version string - so this PR allows for an optional set of user-defined replacements for such characters.