Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "nixUnstable: rename to nix-unstable"
This commit effectively makes it impossible to upgrade to nixUnstable with nix-env without mucking about with priorities, as you can't uninstall the old nix transactionally with the new nix and if you uninstall the old one first you no longer have nix at your disposal to install the new one. This reverts commit 9711aac.
- Loading branch information
bed3695
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.
cc @orivej
bed3695
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.
Do you mean that this did not work, or just that it makes two transactions? The latter is normal because
nix-env
does not allow installation and uninstallation in one invocation.Besides, having two versions of Nix installed at the same time is useful (or was until recently when known upgrade blockers were resolved).
Does "this commit" here refer to the commit you have just made, or the reverted commit? The rest of the phrase is about the reverted, but the beginning seems to be about the current.
bed3695
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.
This gives conflicts if I don't first set priorities.
The reverted commit.
bed3695
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.
Nixpkgs have default priorities. I did not override them and I can install both versions simultaneously. After reverting this commit locally:
May you have some custom priorities that cause the conflict?
bed3695
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.
Hm.... This is working now, strange. Not sure what was broken before.
I still think the package having a different name is incorrect. It doesn't follow our other conventions, it still requires multiple steps to upgrade, and it's not a new package. But I won't strongly object if you want to revert this revert.
bed3695
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.
The whole
-unstable
convention has never made sense to me. For example, it breaks upgrading vianix-env -u
(it won't upgrade an unstable package to a newer stable one).bed3695
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.
I don't follow the
-unstable
convention whenever I can (e.g. an unstable version after a release can be namedX.Y.Z.YYYY-MM-DD
to be properly comparable), but it is needed fornixUnstable
becausenix-env -qa
(EDITnix-env -qc
) does not recognize priorities and shows the highest version for a name even if it will not be installed bynix-env -u
.bed3695
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.
That seems like a minor issue.
bed3695
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.
It is, but it affects some users, and there are no practical reasons to name the unstable version the same as stable.
BTW, what should one do to let
nix-env -u
upgrade to Nix 1.12 pre if it is namednix
rather thannix-unstable
?bed3695
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.
@orivej There are practical reasons: It breaks nix-env -u, and it violates expectations.
bed3695
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.
To answer my own question, one should put this into the Nix config:
I expect that the current users of
nixUnstable
will not want to switch to Nix 1.13 pre as soon as 1.12 becomes stable. Hence they will have to take some action to switch to stable.nix-env -i nix; nix-env -e nix-unstable
is simple and obvious, more so than the snippet above.