1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 21:41:48 +02:00

* Move the patch generator into a module.

This commit is contained in:
Eelco Dolstra 2010-11-29 15:26:28 +00:00
parent 9737a7eba0
commit d3bba0c2d8
4 changed files with 345 additions and 437 deletions

View file

@ -146,7 +146,7 @@ sub readManifest {
sub writeManifest {
my ($manifest, $narFiles, $patches) = @_;
my ($manifest, $narFiles, $patches, $noCompress) = @_;
open MANIFEST, ">$manifest.tmp"; # !!! check exclusive
@ -198,11 +198,13 @@ sub writeManifest {
# Create a bzipped manifest.
system("@bzip2@ < $manifest > $manifest.bz2.tmp") == 0
or die "cannot compress manifest";
unless (defined $noCompress) {
system("@bzip2@ < $manifest > $manifest.bz2.tmp") == 0
or die "cannot compress manifest";
rename("$manifest.bz2.tmp", "$manifest.bz2")
or die "cannot rename $manifest.bz2.tmp: $!";
rename("$manifest.bz2.tmp", "$manifest.bz2")
or die "cannot rename $manifest.bz2.tmp: $!";
}
}