From 0460ea4c395cc45e510d13fbf12930dd3d221305 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 16 Apr 2009 09:27:33 +0000 Subject: [PATCH] * Cleanup. --- scripts/readmanifest.pm.in | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/scripts/readmanifest.pm.in b/scripts/readmanifest.pm.in index b868ca6d9..7244984ea 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"