mirror of
https://github.com/NixOS/nix.git
synced 2024-11-21 22:32:26 +00:00
* Don't barf on lines in nix-pull manifests that we don't recognise.
Necessary for compatibility with 0.7 patch deployment. * Bumped version number to 0.6.1.
This commit is contained in:
parent
2bd9f0d76b
commit
0d157eed99
@ -1,4 +1,4 @@
|
||||
AC_INIT(nix, "0.6")
|
||||
AC_INIT(nix, "0.6.1")
|
||||
AC_CONFIG_SRCDIR(README)
|
||||
AC_CONFIG_AUX_DIR(config)
|
||||
AM_INIT_AUTOMAKE
|
||||
|
@ -17,6 +17,7 @@ sub processURL {
|
||||
open MANIFEST, "<$manifest";
|
||||
|
||||
my $inside = 0;
|
||||
my $type;
|
||||
|
||||
my $storePath;
|
||||
my $narurl;
|
||||
@ -29,24 +30,28 @@ sub processURL {
|
||||
next if (/^$/);
|
||||
|
||||
if (!$inside) {
|
||||
if (/^\{$/) {
|
||||
if (/^\s*(\w*)\s*\{$/) {
|
||||
$inside = 1;
|
||||
$type = $1;
|
||||
$type = "narfile" if $type eq "";
|
||||
undef $storePath;
|
||||
undef $narurl;
|
||||
undef $hash;
|
||||
@preds = ();
|
||||
}
|
||||
else { die "bad line: $_"; }
|
||||
} else {
|
||||
if (/^\}$/) {
|
||||
$inside = 0;
|
||||
|
||||
if ($type eq "narfile") {
|
||||
|
||||
$$storePaths2urls{$storePath} = $narurl;
|
||||
$$urls2hashes{$narurl} = $hash;
|
||||
|
||||
foreach my $p (@preds) {
|
||||
$$successors{$p} = $storePath;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
elsif (/^\s*StorePath:\s*(\/\S+)\s*$/) {
|
||||
@ -61,7 +66,7 @@ sub processURL {
|
||||
elsif (/^\s*SuccOf:\s*(\/\S+)\s*$/) {
|
||||
push @preds, $1;
|
||||
}
|
||||
else { die "bad line: $_"; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user