about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2009-04-16T09·27+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2009-04-16T09·27+0000
commit0460ea4c395cc45e510d13fbf12930dd3d221305 (patch)
tree5c4e3610543d282fe786aa08f4b8c70e73df4b7f /scripts
parentdfb863f3339ee7e43c83803ade2d9fdf418399b7 (diff)
* Cleanup.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/readmanifest.pm.in21
1 files changed, 6 insertions, 15 deletions
diff --git a/scripts/readmanifest.pm.in b/scripts/readmanifest.pm.in
index b868ca6d9fb7..7244984ead6a 100644
--- a/scripts/readmanifest.pm.in
+++ b/scripts/readmanifest.pm.in
@@ -2,9 +2,7 @@ use strict;
 
 
 sub addPatch {
-    my $patches = shift;
-    my $storePath = shift;
-    my $patch = shift;
+    my ($patches, $storePath, $patch) = @_;
 
     $$patches{$storePath} = []
         unless defined $$patches{$storePath};
@@ -25,10 +23,7 @@ sub addPatch {
 
 
 sub readManifest {
-    my $manifest = shift;
-    my $narFiles = shift;
-    my $localPaths = shift;
-    my $patches = shift;
+    my ($manifest, $narFiles, $localPaths, $patches) = @_;
 
     open MANIFEST, "<$manifest"
         or die "cannot open `$manifest': $!";
@@ -154,12 +149,8 @@ sub readManifest {
 }
 
 
-sub writeManifest
-{
-    my $manifest = shift;
-    my $narFiles = shift;
-    my $patches = shift;
-    my $copySources = shift;
+sub writeManifest {
+    my ($manifest, $narFiles, $patches) = @_;
 
     open MANIFEST, ">$manifest.tmp"; # !!! check exclusive
 
@@ -173,9 +164,9 @@ sub writeManifest
             print MANIFEST "{\n";
             print MANIFEST "  StorePath: $storePath\n";
             print MANIFEST "  NarURL: $narFile->{url}\n";
-            print MANIFEST "  Hash: $narFile->{hash}\n";
+            print MANIFEST "  Hash: $narFile->{hash}\n" if defined $narFile->{hash};
             print MANIFEST "  NarHash: $narFile->{narHash}\n";
-            print MANIFEST "  Size: $narFile->{size}\n";
+            print MANIFEST "  Size: $narFile->{size}\n" if defined $narFile->{size};
             print MANIFEST "  References: $narFile->{references}\n"
                 if defined $narFile->{references} && $narFile->{references} ne "";
             print MANIFEST "  Deriver: $narFile->{deriver}\n"