* Put a nix-pull manifest of the Nix store on the CD.

svn path=/nixos/trunk/; revision=7777
This commit is contained in:
Eelco Dolstra 2007-01-23 15:08:00 +00:00
parent d883483a0e
commit 995b749f70
3 changed files with 34 additions and 4 deletions

View File

@ -26,6 +26,10 @@ for i in $storePaths; do
done
# Also put a nix-pull manifest of the closures on the CD.
printManifest=1 perl $pathsFromGraph closure-* > MANIFEST
# Add symlinks to the top-level store objects.
for ((n = 0; n < ${#objects[*]}; n++)); do
object=${objects[$n]}

View File

@ -1,6 +1,7 @@
use strict;
my %storePaths;
my %refs;
foreach my $graph (@ARGV) {
open GRAPH, "<$graph" or die;
@ -13,14 +14,39 @@ foreach my $graph (@ARGV) {
my $deriver = <GRAPH>; chomp $deriver;
my $count = <GRAPH>; chomp $count;
my @refs = ();
for (my $i = 0; $i < $count; ++$i) {
my $ref = <GRAPH>;
my $ref = <GRAPH>; chomp $ref;
push @refs, $ref;
}
$refs{$storePath} = \@refs;
}
close GRAPH;
}
foreach my $storePath (sort (keys %storePaths)) {
print "$storePath\n";
if ($ENV{"printManifest"} eq "1") {
print "version {\n";
print " ManifestVersion: 3\n";
print "}\n";
foreach my $storePath (sort (keys %storePaths)) {
print "{\n";
print " StorePath: $storePath\n";
print " CopyFrom: /tmp/inst-store$storePath\n";
print " References: ";
foreach my $ref (@{$refs{$storePath}}) {
print "$ref ";
}
print "\n";
print "}\n";
}
}
else {
foreach my $storePath (sort (keys %storePaths)) {
print "$storePath\n";
}
}

View File

@ -111,7 +111,7 @@ rec {
# The installer.
nixosInstaller = import ../installer/nixos-installer.nix {
inherit (pkgs) stdenv runCommand substituteAll;
inherit (pkgs) stdenv perl runCommand substituteAll;
inherit nix;
nixpkgsURL = config.get ["installer" "nixpkgsURL"];
};