~kaction/nix-sys

fbc860acdae3c716d50d8844ac52a57ccb76e61e — Dmitry Bogatov 6 months ago 0a6caa9
Make sure that cdb keeps references to all symlinks installed

Without this change nix-collect-garbage may have collected symlinks installed.
Happened to me once when /etc/passwd symlink got collected.
1 files changed, 5 insertions(+), 0 deletions(-)

M nix-sys-generate/nix-sys-generate.py
M nix-sys-generate/nix-sys-generate.py => nix-sys-generate/nix-sys-generate.py +5 -0
@@ 109,6 109,11 @@ def make_output_cdb(out, manifest):
            target = target.encode("utf-8") + b"\0"
            out.put(target, parents)

        paths = b"\0".join(action["path"].encode("utf-8")
                           for action in manifest.values()
                           if action["action"] == "symlink")
        out.put("#gc", paths)


@click.command()
@click.option("--hash", required=True)