[Nix-dev] garbage collection and nix-push

Mathijs Kwik mathijs at bluescreen303.nl
Wed Oct 24 08:48:05 CEST 2012


Hi,

Thanks for your work on this issue.
The cleanup script sounds somewhat useful, but I was trying to stay
manifest-free :)
But, as you describe it, the manifests are just for cleaning, not for
channel distribution so I guess that's OK.

My longer-term solution (that works for pushing to the local system)
is still to just symlink nars to the store, and add the output dir as
auto-gc path. That way no extra space is wasted and cleanup is simply
removing old dirs and have gc take care of the rest. No manifests
needed.

I hope I have some spare time around christmas to get some minimal
perl knowledge :)

On Thu, Oct 18, 2012 at 4:36 PM, Eelco Dolstra
<eelco.dolstra at logicblox.com> wrote:
> Hi,
>
> On 03/10/12 10:19, Mathijs Kwik wrote:
>
>>> I think nix-push should just check whether a narinfo/nar for a given store path
>>> already exist in the output directory, and if so, refrain from rebuilding them.
>
> I've implemented this now: nix-push checks whether the destination directory
> already contains a narinfo+nar file, and if so, doesn't build it.
>
>> Won't help me.
>>
>> I start out with an (versioned) empty output dir every time so that
>> won't help me much.
>> I have a post-push script that then hard links the outputs into my
>> main binary-cache.
>
> What you should probably do is push to the main binary cache directory, and put
> just the manifest in a separate directory, like this:
>
> $ nix-push --dest /tmp/cache --manifest-path /tmp/release-123/MANIFEST PATHS...
>
> For cleanup, there is a script that compares a directory containing NARs against
> a set of manifests and prints out the "dead" paths so that they can be deleted:
>
>   https://nixos.org/repos/nix/release/trunk/channels/print-dead-files.pl
>
> However, this script needs to be updated to deal with the new binary caches
> properly (e.g. it doesn't delete .narinfo files).
>
> --
> Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev


More information about the nix-dev mailing list