From d7d7910ba48d898bda2db92a4f16a6179c855f7d Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 16 Nov 2011 16:25:38 +0000 Subject: * Don't decompress the manifests in /nix/var/nix/manifest. This saves disk space, and, since they're typically only decompressed once (to fill the manifest cache), doesn't make things slower. --- perl/lib/Nix/Manifest.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'perl') diff --git a/perl/lib/Nix/Manifest.pm b/perl/lib/Nix/Manifest.pm index 21c61d284..9c891abb8 100644 --- a/perl/lib/Nix/Manifest.pm +++ b/perl/lib/Nix/Manifest.pm @@ -53,8 +53,14 @@ sub addPatch { sub readManifest_ { my ($manifest, $addNAR, $addPatch) = @_; - open MANIFEST, "<$manifest" - or die "cannot open `$manifest': $!"; + # Decompress the manifest if necessary. + if ($manifest =~ /\.bz2$/) { + open MANIFEST, "$Nix::Config::bzip2 -d < $manifest |" + or die "cannot decompress `$manifest': $!"; + } else { + open MANIFEST, "<$manifest" + or die "cannot open `$manifest': $!"; + } my $inside = 0; my $type; -- cgit v1.2.3