about summary refs log tree commit diff
path: root/scripts/maintenance/gc-releases.pl
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-05-08T19·43-0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-05-08T19·43-0400
commit0c4c8f7a9d09c497d95771c894a5cc3d4276609b (patch)
tree69f34fb0eda2401a9f477ae97994d8248b0ef267 /scripts/maintenance/gc-releases.pl
parentafa7b8a479e48c5642a796563a615314c0261a1a (diff)
Remove obsolete files (moved to release tree)
Diffstat (limited to 'scripts/maintenance/gc-releases.pl')
-rwxr-xr-xscripts/maintenance/gc-releases.pl58
1 files changed, 0 insertions, 58 deletions
diff --git a/scripts/maintenance/gc-releases.pl b/scripts/maintenance/gc-releases.pl
deleted file mode 100755
index b1e41a97c04f..000000000000
--- a/scripts/maintenance/gc-releases.pl
+++ /dev/null
@@ -1,58 +0,0 @@
-#! /var/run/current-system/sw/bin/perl -w -I. -I..
-
-use strict;
-use NixManifest;
-use readcache;
-use File::Basename;
-
-
-# Read the manifests.
-my %narFiles;
-my %patches;
-
-foreach my $manifest (@ARGV) {
-    print STDERR "loading $manifest\n";
-    if (readManifest($manifest, \%narFiles, \%patches, 1) < 3) {
-#        die "manifest `$manifest' is too old (i.e., for Nix <= 0.7)\n";
-    }
-}
-
-
-# Find the live archives.
-my %usedFiles;
-
-foreach my $narFile (keys %narFiles) {
-    foreach my $file (@{$narFiles{$narFile}}) {
-        $file->{url} =~ /\/([^\/]+)$/;
-        my $basename = $1;
-        die unless defined $basename;
-#        print $basename, "\n";
-        $usedFiles{$basename} = 1;
-        print STDERR "missing archive `$basename'\n"
-            unless defined $readcache::archives{$basename};
-    }
-}
-
-foreach my $patch (keys %patches) {
-    foreach my $file (@{$patches{$patch}}) {
-        $file->{url} =~ /\/([^\/]+)$/;
-        my $basename = $1;
-        die unless defined $basename;
-#        print $basename, "\n";
-        $usedFiles{$basename} = 1;
-        die "missing archive `$basename'"
-            unless defined $readcache::archives{$basename};
-    }
-}
-
-
-# Print out the dead archives.
-foreach my $archive (keys %readcache::archives) {
-    next if $archive eq "." || $archive eq "..";
-    if (!defined $usedFiles{$archive}) {
-	my $file = $readcache::archives{$archive};
-        print "$file\n";
-	my $hashFile = dirname($file) . "/.hash." . basename($file);
-	print "$hashFile\n" if -e $hashFile;
-    }
-}