nixos-rebuild-ng: replace get_generations with a shell-based approach - #560972
thiagokokada wants to merge 1 commit into
Conversation
d62067b to
6060141
Compare
2c4a0d3 to
b863045
Compare
|
CC @r-vdp could you help review this PR? |
I'm currently on holidays for another 10 days trying to stay away from my laptop as much as possible. But I'll take a look and test this once I'm back home! |
4f44831 to
209d185
Compare
Friendly ping @r-vdp. Hope you got some good holidays. |
Port the old Python logic to POSIX's shell and remove the usage of `nix-env --list-generations`. While the original objective of `nixos-rebuild-ng` was to avoid having logic written in shell scripting, the only way to unify the two separate approaches of get_generations was to write this in shell, because we also need to run this remotely, but sadly calling `nix-env --list-generations` needs root (NixOS/nix#5144). This also fixes a long standing issue of `nix-collect-garbage` causing the `nixos-rebuild list-generations` to report the wrong build-date after a `nix-collect-garbage` or `nix store optimise`. Fix NixOS#435555.
209d185 to
76478e4
Compare
|
@r-vdp Done, can I get a re-review? |
|
So I got the issue that made using I assume we will get this fixed in the next |
Port the old Python logic to POSIX's shell and remove the usage of
nix-env --list-generations.While the original objective of
nixos-rebuild-ngwas to avoid having logic written in shell scripting, the only way to unify the two separate approaches of get_generations was to write this in shell, because we also need to run this remotely, but sadly callingnix-env --list-generationsneeds root (NixOS/nix#5144).This also fixes a long standing issue of
nix-collect-garbagecausing thenixos-rebuild list-generationsto report the wrong build-date after anix-collect-garbageornix store optimise.Fix #435555.
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.