Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos-rebuild pollutes current directory with "result" symlink #12665

Closed
peti opened this issue Jan 29, 2016 · 18 comments
Closed

nixos-rebuild pollutes current directory with "result" symlink #12665

peti opened this issue Jan 29, 2016 · 18 comments

Comments

@peti
Copy link
Member

peti commented Jan 29, 2016

nixos-rebuild boot creates a symlink like

 lrwxrwxrwx 1 root   root    85 Jan 29 10:53 result -> /nix/store/afv0nbqkx5iii9i4k278a0bsdrhbz7m3-nixos-system-mobile-16.03pre75806.77f8f35

in the current directory. The NixOS version is 16.03pre75806.77f8f35 (current unstable channel).

@domenkozar
Copy link
Member

Most probably a regression in #12324.

I suspect it broke tests http://hydra.nixos.org/job/nixos/trunk-combined/tested#tabs-constituents but I haven't verified that yet.

@domenkozar
Copy link
Member

cc @rickynils

@rickynils
Copy link
Member

I look into it.

@domenkozar Does the fact that symlinks are created break tests?

@dezgeg
Copy link
Contributor

dezgeg commented Jan 29, 2016

Test breakage is not related to this but rather (just got fixed): a581f72

@colemickens
Copy link
Member

switch is doing the same.

@Baughn
Copy link
Contributor

Baughn commented Feb 1, 2016

For cleanup purposes, this should be relatively safe -- though, probably run it once with echo instead of rm, just to be sure.

nix-store --gc --print-roots | awk '{print $1}' | grep /result$ | sudo xargs rm

It will, of course, also delete any result symlinks you might want to keep. But you knew that.

@ayyess
Copy link
Contributor

ayyess commented Nov 1, 2016

nixos-rebuild is making result symlinks on nixos-unstable.

@goodwillcoding
Copy link
Contributor

@abbradar @rickynils
In a related "issue" nixos-rebuild test, build, dry-build, dry-activate also generate the results symlink. To me it seems like the --no-out should be applied there as well so it does not polute the system. I'll issue a PR unless this is somehow a desired behavior.

@wucke13
Copy link
Contributor

wucke13 commented Oct 29, 2018

@goodwillcoding
There is no such option to nixos-rebuild as --no-out

$ nixos-rebuild --no-out
/run/current-system/sw/bin/nixos-rebuild: unknown option `--no-output'

How shall one prevent nixos-rebuild to create those symlinks?

@Baughn
Copy link
Contributor

Baughn commented Nov 2, 2018

That's peculiar. It spell-checked the option... so --no-out exists as an alias for --no-output, but --no-output itself doesn't exist?

@colemickens
Copy link
Member

It's another place in general where the Nix tooling just feels inconsistent... It looks like boot/switch were special cased to not drop the out link, rather than making it a proper flag to nixos-rebuild...

@goodwillcoding
Copy link
Contributor

@wucke13 why are you asking me the same question I posed in this issue ... did your read the comments at all?

@wucke13
Copy link
Contributor

wucke13 commented Nov 10, 2018

@goodwillcoding because I wrongly read your comment as an already working solution, not a suggestion how it should work.

@NonVideri
Copy link

This is still around AFAIK. Just got a "result" symlink in my home directory.

@eclairevoyant
Copy link
Member

@NonVideri with which subcommand?

@NonVideri
Copy link

@eclairevoyant Hard to tell, but probably nixos-rebuild switch, as I mainly use that one.

@eclairevoyant
Copy link
Member

If you are able to reproduce on an up-to-date nix install then please create a new issue for it. Also keep in mind the build and build-vm subcommands will create the symlink and that is expcted.

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/copying-custom-edid/31593/12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests