Author: eelco
Date: Tue Apr 10 15:36:50 2012
New Revision: 33727
URL: https://nixos.org/websvn/nix/?rev=33727&sc=1
Log:
* Copying manifests is slightly tricky because
download-using-manifests expects that the files in
/nix/var/nix/manifests are symlinks into the store.
Modified:
nixos/trunk/modules/installer/tools/nixos-install.sh
nixos/trunk/tests/installer.nix
Modified: nixos/trunk/modules/installer/tools/nixos-install.sh
==============================================================================
--- nixos/trunk/modules/installer/tools/nixos-install.sh Tue Apr 10
14:53:39 2012 (r33726)
+++ nixos/trunk/modules/installer/tools/nixos-install.sh Tue Apr 10
15:36:50 2012 (r33727)
@@ -83,13 +83,6 @@
chown root.nixbld $mountPoint/nix/store
-# Make manifests available in the chroot.
-rm -f $mountPoint/nix/var/nix/manifests/*
-for i in /nix/var/nix/manifests/*.nixmanifest; do
- cp "$(readlink -f "$i")" $mountPoint/nix/var/nix/manifests
-done
-
-
# Get the store paths to copy from the references graph.
storePaths=$(@perl@/bin/perl @pathsFromGraph@ @nixClosure@)
@@ -129,15 +122,24 @@
ln -sf @shell@ $mountPoint/bin/sh
+if test -n "$NIXOS_PREPARE_CHROOT_ONLY"; then
+ echo "User requested only to prepare chroot. Exiting."
+ exit 0;
+fi
+
+
# Make the build below copy paths from the CD if possible. Note that
# /mnt in the chroot is the root of the CD.
export NIX_OTHER_STORES=/mnt/nix:$NIX_OTHER_STORES
-if test -n "$NIXOS_PREPARE_CHROOT_ONLY"; then
- echo "User requested only to prepare chroot. Exiting."
- exit 0;
-fi
+# Make manifests available in the chroot.
+rm -f $mountPoint/nix/var/nix/manifests/*
+for i in /nix/var/nix/manifests/*.nixmanifest; do
+ chroot $mountPoint @nix@/bin/nix-store -r "$(readlink -f "$i")" > /dev/null
+ cp -pd "$i" $mountPoint/nix/var/nix/manifests/
+done
+
# Build the specified Nix expression in the target store and install
# it into the system configuration profile.
Modified: nixos/trunk/tests/installer.nix
==============================================================================
--- nixos/trunk/tests/installer.nix Tue Apr 10 14:53:39 2012 (r33726)
+++ nixos/trunk/tests/installer.nix Tue Apr 10 15:36:50 2012 (r33727)
@@ -122,7 +122,7 @@
"rm /etc/hosts",
"echo 192.168.1.1 nixos.org > /etc/hosts",
"ifconfig eth1 up 192.168.1.2",
- "nix-pull
http://nixos.org/releases/nixpkgs/channels/nixpkgs-unstable/MANIFEST",
+ "nixos-rebuild pull",
);
# Test nix-env.
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits