diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2011-11-16T16·25+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2011-11-16T16·25+0000 |
commit | d7d7910ba48d898bda2db92a4f16a6179c855f7d (patch) | |
tree | 74ac78c9e7334d2ac388feb97d67c2c2213e5335 /perl/lib | |
parent | 63ee5e4d2a46c3619c59307d7dbb08f25d32c3e8 (diff) |
* 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.
Diffstat (limited to 'perl/lib')
-rw-r--r-- | perl/lib/Nix/Manifest.pm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/perl/lib/Nix/Manifest.pm b/perl/lib/Nix/Manifest.pm index 21c61d284faf..9c891abb8bd9 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; |