* Handle .nar.xz.

git-svn-id: https://nixos.org/repos/nix/release/trunk/channels@34737 70bd8c7a-acb8-0310-9f0d-9cc1c95dcdbb
This commit is contained in:
Eelco Dolstra 2013-06-17 02:15:49 +00:00
parent 1c233f0b23
commit 9ff5956af0

View file

@ -36,6 +36,7 @@ foreach my $storePath (keys %narFiles) {
if ($file->{hash} =~ /sha256:(.+)/) {
die unless length($1) == 52;
$usedFiles{"$1.nar.bz2"} = 1;
$usedFiles{"$1.nar.xz"} = 1;
}
#print STDERR "missing archive `$basename'\n"
# unless defined $readcache::archives{$basename};
@ -59,7 +60,7 @@ sub checkDir {
my ($dir) = @_;
opendir(DIR, "$dir") or die "cannot open `$dir': $!";
while (readdir DIR) {
next unless $_ =~ /^sha256_/ || $_ =~ /\.nar-bsdiff$/ || $_ =~ /\.nar\.bz2$/;
next unless $_ =~ /^sha256_/ || $_ =~ /\.nar-bsdiff$/ || $_ =~ /\.nar\.bz2$/ || $_ =~ /\.nar\.xz$/;
if (!defined $usedFiles{$_}) {
print "$dir/$_\n";
} else {