Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setPackage allows illegal version #18

Closed
ebowman opened this issue Oct 21, 2012 · 5 comments
Closed

setPackage allows illegal version #18

ebowman opened this issue Oct 21, 2012 · 5 comments
Assignees

Comments

@ebowman
Copy link

ebowman commented Oct 21, 2012

setPackage lets you set a version that fails silently at runtime. In particular, '-', '/', '~'. and '.' are illegal characters, but Builder.setPackage does not detect that and throw an exception. This leads to very cryptic failures later on. In particular, we versioned an RPM like "1.2.3-SNAPSHOT", and the RPM build correctly, and installed correctly, but failed silently at erase time. It took awhile to figure out what was going on; it would be great if redline would have detected that problem.

@ghost ghost assigned craigwblake Dec 6, 2012
@fredcooke
Copy link

The maven plugin does this mapping, however it might be nicer for it to exist in the core library?

Also see: RiotGamesMinions/riot-redline-plugin#4

@craigwblake
Copy link
Owner

I'll take a look at incorporating this change as soon as I have time to dedicate to it.

mbecker73 pushed a commit to mbecker73/redline that referenced this issue Jan 17, 2014
@mbecker73
Copy link
Contributor

Instead of throwing an Exception, should invalid characters be mapped to "+" or an empty string, as fredcooke is suggesting?

@craigwblake
Copy link
Owner

Well, let's start with flagging it as an error, then I can add the conversion to a "+" after that. Care to send a pull request for that commit? I'd grab it directly but I don't think that will keep the proper author/committer metadata.

craigwblake added a commit that referenced this issue Jan 17, 2014
Added checking for additional illegal characters when setting version and release (Issue #18)
@craigwblake
Copy link
Owner

This should be fixed in 1.1.15 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants