about summary refs log tree commit diff
path: root/scripts/readmanifest.pm.in
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2004-12-20T16·38+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2004-12-20T16·38+0000
commit3d1b2101ccfd34f15b108f54a563a616cb679109 (patch)
treeadfdf74a5efc7d8b1eb4d4e939768d6c4895c286 /scripts/readmanifest.pm.in
parent7eed57e784068ae6e2e9bf4409639067df467cd3 (diff)
* Place manifests in /nix/var/nix/manifests.
* Use the new patch downloader.

Diffstat (limited to 'scripts/readmanifest.pm.in')
-rw-r--r--scripts/readmanifest.pm.in11
1 files changed, 9 insertions, 2 deletions
diff --git a/scripts/readmanifest.pm.in b/scripts/readmanifest.pm.in
index 8d6694ff2e54..7f41bd55f267 100644
--- a/scripts/readmanifest.pm.in
+++ b/scripts/readmanifest.pm.in
@@ -19,6 +19,7 @@ sub readManifest {
     my $basePath;
     my $baseHash;
     my $patchType;
+    my $narHash;
 
     while (<MANIFEST>) {
         chomp;
@@ -34,6 +35,7 @@ sub readManifest {
                 undef $hash;
                 $size = 999999999;
                 @preds = ();
+                undef $narHash;
 	    }
             elsif (/^patch \{$/) {
                 $type = "patch";
@@ -44,6 +46,7 @@ sub readManifest {
                 undef $basePath;
                 undef $baseHash;
                 undef $patchType;
+                undef $narHash;
             }
             else { die "bad line: $_"; }
         } else {
@@ -71,7 +74,9 @@ sub readManifest {
                     }
                     if (!$found) {
                         push @{$narFileList},
-                            {url => $url, hash => $hash, size => $size};
+                            { url => $url, hash => $hash, size => $size
+                            , narHash => $narHash
+                            };
                     }
                 
                     foreach my $p (@preds) {
@@ -102,6 +107,7 @@ sub readManifest {
                         push @{$patchList},
                             { url => $url, hash => $hash, size => $size
                             , basePath => $basePath, baseHash => $baseHash
+                            , narHash => $narHash
                             };
                     }
                     
@@ -117,11 +123,12 @@ sub readManifest {
             elsif (/^\s*BasePath:\s*(\/\S+)\s*$/) { $basePath = $1; }
             elsif (/^\s*BaseHash:\s*(\S+)\s*$/) { $baseHash = $1; }
             elsif (/^\s*Type:\s*(\S+)\s*$/) { $patchType = $1; }
+            elsif (/^\s*NarHash:\s*(\S+)\s*$/) { $narHash = $1; }
 
             # Compatibility;
             elsif (/^\s*NarURL:\s*(\S+)\s*$/) { $url = $1; }
             elsif (/^\s*MD5:\s*(\S+)\s*$/) { $hash = $1; }
-            
+
             else { die "bad line: $_"; }
         }
     }