-
Notifications
You must be signed in to change notification settings - Fork 364
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
Add support for sorting caret ('^') higher than base version #88
Conversation
b7c479d
to
b06d273
Compare
@@ -45,6 +45,20 @@ int rpmvercmp(const char * a, const char * b) | |||
continue; | |||
} | |||
|
|||
/* | |||
* Handle plus separator. Concept is same as tilde, but it one of | |||
* strings ends, it's considered as lower version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this read "it's considered as higher version"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no.
b06d273
to
4a81f5b
Compare
Looks good to me! 👍 |
1.1^20160101 means 1.1 version (base) and patches which were applied at that date on top of it. * 1.1^201601 > 1.1 * 1.1^201601 < 1.1.1 Second case might be fulfilled with tilde separator, but it's not obvious and doesn't fulfil first case. Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
5af2531
to
6210269
Compare
Changed to caret as @ffesti requested in ML. |
OK, looks like Fedora is going for a policy that works with the current version compare. If version and release strings are chosen with some care (which they have to be anyway) I do not really see an immediate need for this. Closing for now. |
@ffesti @pmatilai we've discussed this roughly a bit today during our FPC meeting and we pretty much agreed that it would be very good to have this in RPM. Because right now when you want to make post-release snapshot, you would use Can we re-open this please? |
@ignatenkobrain That's why you're supposed to do something like |
I can go further with some worse examples like openssl ;)
|
You crush my soul. 😢 |
I mean if we have tilde, there is a need to have operator which is doing opposite -- that is caret ;) |
Hey, this was just pointed out to me, and it seems to perfectly provide a solution to a problem. As many might be aware, the Fedora packaging committee has periodically taken up the issue of using tilde Version:. And I've been putting in a load of effort trying to come up with a consistent scheme which actually covers the range of cases that our current scheme does. One thing I've run into is that tilde is one of a pair of operators you actually need to implement a scheme which consistently places information about snapshots into the Version: field. If you use tilde, you can (and in some cases must) move prerelease information on snapshots into Version:, but information on post-release snapshots has to stay in Release: because you cannot know what upstream will call the next version. So you can't do I first mentioned this in the context of the work I'm doing in https://pagure.io/packaging-committee/issue/398#comment-540026 and also in my notes for the use of tilde in https://fedoraproject.org/wiki/User:Tibbs/TildeVersioning#Conceptual_issues_with_tilde @pmatilai also indirectly mentions this in https://pagure.io/packaging-committee/issue/398#comment-540133 and mentions that it can be hacked around by adding random zeroes. Though in reality, you would have to add multiple zeroes to truly avoid conflicts. So, while lack of this isn't going to stop the current effort to implement tilde, it would certainly simplify things if we had it. |
@ignatenkobrain I'm not against this, I'm just sad that bad versioning is a thing. |
Also, as for the reason this was closed:
Note that when creating Fedora policies and guidelines, the FPC is forced to make it work with the current version compare (current anything generally), otherwise the policy cannot be used, as it would not work. If we have this, we can make the policy far simpler. Please reconsider applying this. |
I can't reopen this, perhaps because the original branch was deleted. Anyway, I'm at least willing to discuss and certainly not directly opposed if somebody wants to open a new PR. Not because Fedora this or that but because I think symmetry makes sense: if we have a way force sorting one way, then why not the other way too? |
1.1^20160101 means 1.1 version (base) and patches which were applied at
that date on top of it.
Second case might be fulfilled with tilde separator, but it's not obvious
and doesn't fulfil first case.
Signed-off-by: Igor Gnatenko i.gnatenko.brain@gmail.com