Closed Gerschtli closed 1 year ago
Wait, so, it used to accumulate packages before without removing? Or am I misunderstanding something? Do we want a test for this?
In case of no flake input/channel updates, yes. In case of updates, the activation would have failed because there would have been an error like "/bin/abc is already installed, not able to install it in the profile" like shown in the related HM issue.
Sure, good idea, will add a test.
Regarding the test: Not sure how to do this properly because this means I need to convert the default profile to "nix profile"-type and can not really roll it back to "nix-env"-type
error: profile '/nix/var/nix/profiles/per-user/nix-on-droid/profile' is incompatible with 'nix-env'; please use 'nix profile' instead
So we can either test nix-env
or nix profile
activation logic but not both. Maybe we need to rethink our tests a little bit, also with the fact that they require a channel-setup and don't work with flakes..
@t184256 How do we want to go on here? I think it would be great to have this fix before creating 21.11 release.
Do you have suggestions how to write a test for that?
As "rethink our tests to nuke environment in between them" sounds overly grandiose, maybe we can merge that with just the manual testing.
Created https://github.com/t184256/nix-on-droid/issues/233 to don't forget it.
I tested it manually on device.
Manual removal and installation as two non-atomical steps is required because of https://github.com/NixOS/nix/issues/6349.
Related https://github.com/nix-community/home-manager/pull/3367