-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
invalid version for semver pre-releases when targeting "pacman"
#7601
Comments
Happy to review a PR for the change! |
Hello @mmaietta , the current implementation still presents some weird ordering behaviour on Debian: ### According to semver 2.0, '1.0.0' should be considered greater than '1.0.0-rc1'. But for Debian it's not.
### This means that Debian will consider final releases a "downgrade" compared to the RCs, so it will always prefer installing the RC if both are available
$ dpkg --compare-versions 1.0.0 gt 1.0.0-rc1; echo $?
1
### On the other hand, using '~' instead of '-' yelds the correct ordering
$ dpkg --compare-versions 1.0.0 gt 1.0.0~rc1; echo $?
0 I have tested the changes from #7630 and extended the translation of edit: also opened a dedicated issue for this #7977 |
ah i didn't see the footnotes when i opened the pr, the tilde is explained in the debian docs in footnote 7 |
building for target
"pacman"
with a semver compatible pre-release version (e.g.0.0.0-alpha.0
,3.0.0-preview.19
) results in an invalid version format, since arch linux does not allow hyphens in package versions. installing the package then results not in installing the desiredpackage-name@0.0.0-alpha.0
but insteadpackage-name-0.0.0@alpha.0
.changing the hyphen to an underscore (like the arch wiki recommends) or a period (also common, though not recommended) results in an
Invalid version: "0.0.0_alpha.0"
error.i am unsure how exactly to deal with this, but i would probably recommend following the advice from the arch wiki and replacing the hyphen with an underscore when building for the
"pacman"
target.The text was updated successfully, but these errors were encountered: