about summary refs log tree commit diff
path: root/scripts/readmanifest.pm.in
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-11-29T09·26+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-11-29T09·26+0000
commit9737a7eba0844e317591f16092879696c4f3feae (patch)
tree6feaaa6a5f97402f66fc0c99151bbb8e7dc30495 /scripts/readmanifest.pm.in
parentbd48fd97f646f068ae2725b5b2f048d45866119b (diff)
* Don't generate patches if the system type differs.
Diffstat (limited to 'scripts/readmanifest.pm.in')
-rw-r--r--scripts/readmanifest.pm.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/readmanifest.pm.in b/scripts/readmanifest.pm.in
index c2c4be89b271..82a01e5ab799 100644
--- a/scripts/readmanifest.pm.in
+++ b/scripts/readmanifest.pm.in
@@ -34,7 +34,7 @@ sub readManifest {
     my $manifestVersion = 2;
 
     my ($storePath, $url, $hash, $size, $basePath, $baseHash, $patchType);
-    my ($narHash, $narSize, $references, $deriver, $hashAlgo, $copyFrom);
+    my ($narHash, $narSize, $references, $deriver, $hashAlgo, $copyFrom, $system);
 
     while (<MANIFEST>) {
         chomp;
@@ -56,6 +56,7 @@ sub readManifest {
                 undef $basePath;
                 undef $baseHash;
                 undef $patchType;
+                undef $system;
                 $references = "";
                 $deriver = "";
                 $hashAlgo = "md5";
@@ -83,6 +84,7 @@ sub readManifest {
                             , narHash => $narHash, narSize => $narSize
                             , references => $references
                             , deriver => $deriver, hashAlgo => $hashAlgo
+                            , system => $system
                             };
                     }
                 
@@ -128,6 +130,7 @@ sub readManifest {
             elsif (/^\s*References:\s*(.*)\s*$/) { $references = $1; }
             elsif (/^\s*Deriver:\s*(\S+)\s*$/) { $deriver = $1; }
             elsif (/^\s*ManifestVersion:\s*(\d+)\s*$/) { $manifestVersion = $1; }
+            elsif (/^\s*System:\s*(\S+)\s*$/) { $system = $1; }
 
             # Compatibility;
             elsif (/^\s*NarURL:\s*(\S+)\s*$/) { $url = $1; }
@@ -165,6 +168,7 @@ sub writeManifest {
                 if defined $narFile->{references} && $narFile->{references} ne "";
             print MANIFEST "  Deriver: $narFile->{deriver}\n"
                 if defined $narFile->{deriver} && $narFile->{deriver} ne "";
+            print MANIFEST "  System: $narFile->{system}\n" if defined $narFile->{system};
             print MANIFEST "}\n";
         }
     }