From 7161ef14a2f26fa4f1be9633de2f423492ee76c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophane=20Hufschmitt?= <7226587+thufschmitt@users.noreply.github.com> Date: Tue, 5 Mar 2024 08:07:58 +0100 Subject: [PATCH] Add a warning against carelessly changing the profile version number Try and prevent the situation of https://github.com/NixOS/nix/issues/10109 to happen again in the future --- src/nix/profile.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/nix/profile.cc b/src/nix/profile.cc index d39a24d36..2bb29a67b 100644 --- a/src/nix/profile.cc +++ b/src/nix/profile.cc @@ -222,6 +222,8 @@ struct ProfileManifest es[name] = obj; } nlohmann::json json; + // Only upgrade with great care as changing it can break fresh installs + // like in https://github.com/NixOS/nix/issues/10109 json["version"] = 3; json["elements"] = es; return json;