Open masaeedu opened 5 years ago
nix-env --upgrade
simply looks for packages with the same name unfortunately.
But given that nixpkgs.dex still resolves to the same thing, how did I end up with the other one?
On Tue, Oct 22, 2019, 11:20 AM Tor Hedin Brønner notifications@github.com wrote:
nix-env --upgrade simply looks for packages with same name unfortunately.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/NixOS/nixpkgs/issues/71682?email_source=notifications&email_token=AA4A7SDFOZP2NX7NCVA4BQ3QP4K27A5CNFSM4JDRCCM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEB6EGQY#issuecomment-545014595, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4A7SFJPH66KFU2S53FFB3QP4K27ANCNFSM4JDRCCMQ .
Ah, right, by names I mean the name in the derivation (eg. nixpkgs.dex.name
without the version). nix-env --upgrade
simply doesn't use attribute paths (.
separated path). Same goes for nix-env --install
, but there you can supply -A
to tell it to use attribute paths, which as far as I know doesn't work with --upgrade
as it lacks the required information.
It would indeed be nice if it used meta.position to decide between name collisions though (didn't know it stored that info at all :).
Thank you for your contributions. This has been automatically marked as stale because it has had no activity for 180 days. If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity. Here are suggestions that might help resolve this more quickly:
This is still important to me.
I marked this as stale due to inactivity. → More info
Issue description
I performed an upgrade of all my nix packages using:
After the upgrade, I discovered various parts of my system weren't working correctly. It turns out that this dex (which is a tool I've been using to orchestrate startup tasks), had somehow gotten replaced with this dex which is some kind of OpenID related server.
I can't quite figure out how this happened, because based on
nix edit nixpkgs.dex
, the top leveldex
attribute still resolves to the old dex derivation (which is the one I want).Here's the relevant diff in my manifest.nix:
My question is about what the expected semantics of
nix-env -u
are (I had been assuming it always uses themeta.position
field to figure out what to upgrade to, but apparently this is wrong), and how I can avoid messing up my system like this in the future. Thanks.Technical details