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
nix-store does not obey NIX_IGNORE_SYMLINK_STORE
#374
Comments
Why not mount the NFS mount directly over /nix? On Fri, Oct 17, 2014 at 5:00 PM, Ryan Newton notifications@github.com
|
Well, much like in #324 we are not using this on personal machines or ones where we have root. We want to use nix precisely for reproducibility across wide-flung machines with different configurations -- for us this means various supercomputers and our university shared linux systems. In the latter cases I convinced our sysadmins to symlink Still, it seems like this particular "bug" should be an easy fix, and would enable this symlinked mode of installation. |
I can't reproduce this. This works:
|
Huh, this is surprising. If I run the "install" shell script: $ ./nix-binary-tarball-unpack/nix-1.7-x86_64-linux/install
....
....
+ echo 'initialising Nix database...'
initialising Nix database...
+ /nix/store/clnpynyac3hx3a6z5lsy893p7b4rwnyf-nix-1.7/bin/nix-store --init
error: `/nix' is not a directory
+ echo './nix-binary-tarball-unpack/nix-1.7-x86_64-linux/install: failed to initialize the Nix database'
./nix-binary-tarball-unpack/nix-1.7-x86_64-linux/install: failed to initialize the Nix database
+ exit 1 And then I can repeat that failed command myself till my heart's content and I still see the error: $ /nix/store/clnpynyac3hx3a6z5lsy893p7b4rwnyf-nix-1.7/bin/nix-store --init
error: `/nix' is not a directory Then I can add in these env vars one-by-one and still get the error: $ NIX_IGNORE_SYMLINK_STORE=1 /nix/store/clnpynyac3hx3a6z5lsy893p7b4rwnyf-nix-1.7/bin/nix-store --init
error: `/nix' is not a directory
$ NIX_IGNORE_SYMLINK_STORE=1 NIX_REMOTE= /nix/store/clnpynyac3hx3a6z5lsy893p7b4rwnyf-nix-1.7/bin/nix-store --init
error: `/nix' is not a directory Finally, it's
|
Oh, however, that only works when $ NIX_IGNORE_SYMLINK_STORE=1 NIX_REMOTE= NIX_STATE_DIR=/nix/var/nix /nix/store/clnpynyac3hx3a6z5lsy893p7b4rwnyf-nix-1.7/bin/nix-store --init
error: `/nix' is not a directory
$ NIX_IGNORE_SYMLINK_STORE=1 NIX_REMOTE= NIX_STATE_DIR=/nix/var/nix NIX_STORE_DIR=/nix/store /nix/store/clnpynyac3hx3a6z5lsy893p7b4rwnyf-nix-1.7/bin/nix-store --init
error: `/nix' is not a directory |
What throws that error? It's not https://github.com/NixOS/nix/blob/master/src/libstore/local-store.cc#L217-L219 since the message is different... |
Btw, the work-around that I'm using on some machines is to create a /nix dir, install, and then move the contents of it somewhere else, then symlink it. But if it requires going through a sysadmin for those steps thats a pain. I'll probably just instead create a tarball capturing the installed state, and reproduce the rest of the install script that sets up |
I have a symlink |
Ok, so does that amount o a failure to reproduce? I'll give it a try again now that a couple years have passed. |
@rrnewton is this still a problem / still relevant or can this issue be closed? |
I marked this as stale due to inactivity. → More info |
I closed this issue due to inactivity. → More info |
When
/nix
is a symlink into a network file system, the current installer fails. Down inside itsinstall
script, this is what happens:+ /nix/store/clnpynyac3hx3a6z5lsy893p7b4rwnyf-nix-1.7/bin/nix-store --init error: `/nix' is not a directory
It would be nice if
nix-store
would also obey theNIX_IGNORE_SYMLINK_STORE
flag, and tolerate this symlink.Or..... perhaps this is unintended, and the current behavior is just a bug. Maybe it just should have followed the symlink when checking the file type. For example:
The text was updated successfully, but these errors were encountered: