Skip to content

Commit

Permalink
google-compute-image: copy store paths with rsync
Browse files Browse the repository at this point in the history
In `nixos/modules/virtualisation/google-compute-image.nix`, copy store
paths with `rsync -a` rather than `cp -prd`, because `rsync` seems
better able to handle the hard-links that may be present in the store,
whereas `cp` may fail to copy them.

I have tested that the Google Compute Engine image builds successfully
for me with this patch, whereas it did not without this patch.

This is the same fix applied for Azure images in commit
097ef6e.

Fixes #23973.
  • Loading branch information
8573 authored and globin committed Mar 24, 2017
1 parent 82624cb commit e0e520a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nixos/modules/virtualisation/google-compute-image.nix
Expand Up @@ -62,7 +62,7 @@ in
mkdir -p /mnt/nix/store
echo "copying everything (will take a while)..."
cp -prd $storePaths /mnt/nix/store/
${pkgs.rsync}/bin/rsync -a $storePaths /mnt/nix/store/
# Register the paths in the Nix database.
printRegistration=1 perl ${pkgs.pathsFromGraph} /tmp/xchg/closure | \
Expand Down

0 comments on commit e0e520a

Please sign in to comment.