[Nix-dev] unable to delete a store path
Mathijs Kwik
mathijs at bluescreen303.nl
Wed Sep 26 13:49:05 CEST 2012
On Wed, Sep 26, 2012 at 1:39 PM, Marc Weber <marco-oweber at gmx.de> wrote:
> Try such:
>
> STORE_PATH=/nix/store/jra1icncr6bfp9ysjf858z9rs3r54h4
>
> follow_link_rec(){
> if [ -s "$1" ]; then
> [ /nix/store == "${1:0:10}" ] && echo "$1"
> follow_link_rec "$(readlink "$1")"
> else
> echo "$1"
> fi
> }
>
> find /nix/var/nix/gcroots -type l | while read l; do
> if follow_link_rec "$l" | grep -q $STORE_PATH; then
> echo "$l" somehow references your store path $STORE_PATH
> fi
> done
>
> In my test (using the store path referenced by /var/run/current-system)
> I get this output:
>
> /nix/var/nix/gcroots/current-system somehow references your store path /nix/store/jra1icncr6bfp9ysjf858z9rs3r54h4
> /nix/var/nix/gcroots/booted-system somehow references your store path /nix/store/jra1icncr6bfp9ysjf858z9rs3r54h4
I get no output when I run your script against my store path
>
> and this is expected. However mind that the nix-store query you ran does
> not show the gc root origin:
>
> %nix-store --query --referrers-closure /nix/store/jra1icncr6bfp9ysjf858z9rs3r54h4l-nixos-0.1pre-git
> /nix/store/jra1icncr6bfp9ysjf858z9rs3r54h4l-nixos-0.1pre-git
I checked the gc roots too, see my previous mail
>
> However like in your case it seems to reference itself (whatever this
> means - don't know)
It seems a lot of store paths refer to themselves, so I don't think
that's the cause of the problem.
>
> So what may have happened? Eventually you ran nix-build or such
> (creating a result link) in /nix/var/nix/gcroots ?
> Is this allowed? That's just a wild guess.
I really have no idea. I've never built xine myself, as I don't use
it. It must have come as a dependency for kde or something but I'm
100% sure I've never ran nix-build or nix-env for it directly.
>
> If you get some output we'll know more, if you don't we'll have to
> continue digging for the cause.
Well it's not that big an issue. I think in this case it's pretty safe
to manually delete it, but it would be nice to find out what happened.
>
> Marc Weber
> _______________________________________________
> 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