From a3e04ba0aa8c8cd759e902cee14de2080a1345ce Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 25 May 2012 02:30:52 +0000 Subject: [PATCH] * Fix problems with repeated installations due to the immutable bit (http://hydra.nixos.org/build/2645533). svn path=/nixos/trunk/; revision=34235 --- modules/installer/tools/nixos-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/installer/tools/nixos-install.sh b/modules/installer/tools/nixos-install.sh index e64d4d5061db..1b0bfc97f083 100644 --- a/modules/installer/tools/nixos-install.sh +++ b/modules/installer/tools/nixos-install.sh @@ -91,6 +91,7 @@ storePaths=$(@perl@/bin/perl @pathsFromGraph@ @nixClosure@) echo "copying Nix to $mountPoint...." for i in $storePaths; do echo " $i" + chattr -R -i $mountPoint/nix/store/$i 2> /dev/null || true # clear immutable bit rsync -a $i $mountPoint/nix/store/ done @@ -124,7 +125,7 @@ ln -sf @shell@ $mountPoint/bin/sh if test -n "$NIXOS_PREPARE_CHROOT_ONLY"; then echo "User requested only to prepare chroot. Exiting." - exit 0; + exit 0 fi