-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Description
Before #5150, this section of the multi-user installer used rsync and was (IIRC) ~idempotent:
nix/scripts/install-multi-user.sh
Lines 759 to 768 in 7e301fd
install_from_extracted_nix() { | |
task "Installing Nix" | |
( | |
cd "$EXTRACTED_NIX_PATH" | |
_sudo "to copy the basic Nix files to the new store at $NIX_ROOT/store" \ | |
cp -RPp ./store/* "$NIX_ROOT/store/" | |
_sudo "to make the new store non-writable at $NIX_ROOT/store" \ | |
chmod -R ugo-w "$NIX_ROOT/store/" |
Dropping the rsync dependency to support debian makes sense, but it would be nice to figure out whether we can portably make this step idempotent again--and do it, if it's simple enough.
Shooting from the hip:
- this might be as simple as using cp's
-f
flag, if it's portable? - it's probably not as simple as just ignoring the exit code from cp, since there could be other issues
- it's probably not as simple as just diffing the directories, since an existing store will contain more than the store seed
(If we can't do this without, say, wiping the store or restoring the rsync dependency, we should probably figure out how to fail faster until we can find another approach.)
fricklerhandwerk
Metadata
Metadata
Assignees
Labels
No labels