lib.version: change pre-git to post-git on the release branch #86313
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation for this change
When there is no .version-suffix file in nixpkgs (like when fetching
nixpkgs with builtins.fetchGit), lib.version suffixes the version string
with "pre-git". The "pre" bit is special cased in
builtins.compareVersions which means "20.03pre-git" is interpreted as
"less than 20.03". This is clearly wrong for the release-20.03 branch
after the release has been made.
Change the suffix to "post-git" to make code like this behave the same
whether nixpkgs is fetched from git or the channel (which has
.version-suffix file):
(Currently the result depend on how nixpkgs was obtained!)
This change should be made part of the release process.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)CC @worldofpeace @disassembler (release managers for NixOS 20.03)