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

Semver comparison between revbumped packages #679

Closed
mudler opened this issue Sep 21, 2021 · 1 comment · Fixed by #682
Closed

Semver comparison between revbumped packages #679

mudler opened this issue Sep 21, 2021 · 1 comment · Fixed by #682
Assignees
Labels
kind/bug Something isn't working

Comments

@mudler
Copy link
Contributor

mudler commented Sep 21, 2021

Currently, our automation handles revbump by incrementing the number after the +, although now that with #653 we index all the packages - this means that the luet solver will both see e.g. 1.0+1 and 1.0+2 available.

The problem is that in semantic version 1.0+1 and 1.0+2 are identical from an ordering perspective. Everything after the + is considered metadata and can have arbitrary characters, so it's not possible to order them without defining a specific criteria

Expected behavior
Ordering should take into account of numbers and pick the latest, or either move away from + and use - which should be used for internal bumps

Alternatives
Do not use + for revbumps

See also
https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version

@mudler mudler added the kind/bug Something isn't working label Sep 21, 2021
@mudler mudler self-assigned this Sep 21, 2021
mudler added a commit that referenced this issue Sep 21, 2021
"+" is for metadata and not numeric versioning, in fact it cannot be
compared and for e.g. a+1 and a+2 are at the same version when comparing
in semver notation.
By using dashes we refer to internal numbering, and instead can be
ordered

Fixes #679

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
mudler added a commit that referenced this issue Sep 21, 2021
"+" is for metadata and not numeric versioning, in fact it cannot be
compared and for e.g. a+1 and a+2 are at the same version when comparing
in semver notation.
By using dashes we refer to internal numbering, and instead can be
ordered

Fixes #679

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
mudler added a commit that referenced this issue Sep 21, 2021
"+" is for metadata and not numeric versioning, in fact it cannot be
compared and for e.g. a+1 and a+2 are at the same version when comparing
in semver notation.
By using dashes we refer to internal numbering, and instead can be
ordered

Fixes #679

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
mudler added a commit that referenced this issue Sep 21, 2021
"+" is for metadata and not numeric versioning, in fact it cannot be
compared and for e.g. a+1 and a+2 are at the same version when comparing
in semver notation.
By using dashes we refer to internal numbering, and instead can be
ordered

Fixes #679

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
mudler added a commit that referenced this issue Sep 22, 2021
"+" is for metadata and not numeric versioning, in fact it cannot be
compared and for e.g. a+1 and a+2 are at the same version when comparing
in semver notation.
By using dashes we refer to internal numbering, and instead can be
ordered

Fixes #679

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
@mudler mudler reopened this Sep 22, 2021
@mudler
Copy link
Contributor Author

mudler commented Sep 22, 2021

There are still some left overs to take care of before closing the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant