From 51e53116e9969b596ed9cc51d3b84630f55e6d82 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 16 Oct 2009 11:33:48 +0000 Subject: [PATCH] * Put the NAR hash in the filename to prevent problems if Hydra redoes a derivation. git-svn-id: https://nixos.org/repos/nix/release/trunk/channels@17852 70bd8c7a-acb8-0310-9f0d-9cc1c95dcdbb --- mirror-channel.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mirror-channel.pl b/mirror-channel.pl index 0560c0e..156b360 100644 --- a/mirror-channel.pl +++ b/mirror-channel.pl @@ -38,8 +38,10 @@ print "$size store paths in manifest\n"; while (my ($storePath, $files) = each %narFiles) { foreach my $file (@{$files}) { + my $narHash = $file->{narHash}; my $srcURL = $file->{url}; - my $dstName = basename $srcURL; + my $dstName = $narHash; + $dstName =~ s/:/_/; # `:' in filenames might cause problems my $dstFile = "$dstChannelPath/$dstName"; my $dstURL = "$dstChannelURL/$dstName";