Author: eelco Date: 2010-07-08 09:09:28 +0000 (Thu, 08 Jul 2010) New Revision: 22524
You can view the changes in this commit at: https://svn.nixos.org/viewvc/nix?rev=22524&view=rev Modified: release/trunk/channels/mirror-channel.pl Log: * Run generate-patches.pl. Changes: Modified: release/trunk/channels/mirror-channel.pl =================================================================== --- release/trunk/channels/mirror-channel.pl 2010-07-08 09:02:10 UTC (rev 22523) +++ release/trunk/channels/mirror-channel.pl 2010-07-08 09:09:28 UTC (rev 22524) @@ -67,7 +67,7 @@ rename($dstFileTmp, $dstFile) or die "cannot rename $dstFileTmp"; } - $file->{size} = stat($dstFile)->size or die; + $file->{size} = stat($dstFile)->size or die "cannot get size of $dstFile"; my $hashFile = "$narPath/.hash.$dstName"; my $hash; @@ -87,19 +87,26 @@ } # Write the new manifest. -writeManifest("$dstChannelPath/MANIFEST", \%narFiles, \%patches); +writeManifest("$dstChannelPath/MANIFEST.tmp", \%narFiles, \%patches); +# Generate patches. +if (-e "$dstChannelPath/MANIFEST.tmp") { + system("perl -I /home/buildfarm/nix/scripts /home/buildfarm/nix/scripts/generate-patches.pl $narPath $patchesPath $patchesURL $dstChannelPath/MANIFEST $dstChannelPath/MANIFEST.tmp") == 0 or die; + rename("$dstChannelPath/MANIFEST.tmp", "$dstChannelPath/MANIFEST") or die; + rename("$dstChannelPath/MANIFEST.tmp.bz2", "$dstChannelPath/MANIFEST.bz2") or die; +} + # Mirror nixexprs.tar.bz2. my $tmpFile = "$dstChannelPath/.tmp.$$.nixexprs.tar.bz2"; system("$curl '$nixexprsURL' > $tmpFile") == 0 or die "cannot download `$nixexprsURL'"; rename($tmpFile, "$dstChannelPath/nixexprs.tar.bz2") or die "cannot rename $tmpFile"; # Remove ".hash.*" files corresponding to NARs that have been removed. -foreach my $fn (glob "$narPath/.hash.*") { - my $fn2 = $fn; - $fn2 =~ s/\.hash\.//; - if (! -e "$fn2") { - print STDERR "removing hash $fn\n"; - unlink "$fn"; - } -} +#foreach my $fn (glob "$narPath/.hash.*") { +# my $fn2 = $fn; +# $fn2 =~ s/\.hash\.//; +# if (! -e "$fn2") { +# print STDERR "removing hash $fn\n"; +# unlink "$fn"; +# } +#} _______________________________________________ nix-commits mailing list [email protected] http://mail.cs.uu.nl/mailman/listinfo/nix-commits
