nix-generate-patches: Optionally write new patches to $NIX_ALL_PATCHES

This commit is contained in:
Hydra mirror 2012-04-04 20:46:18 +00:00
parent 34ea91b259
commit 3b859ead37

View file

@ -39,4 +39,14 @@ generatePatches \%srcNarFiles, \%dstNarFiles, \%srcPatches, \%dstPatches,
propagatePatches \%srcPatches, \%dstNarFiles, \%dstPatches; propagatePatches \%srcPatches, \%dstNarFiles, \%dstPatches;
# Optionally add all new patches to the manifest in $NIX_ALL_PATCHES.
my $allPatchesFile = $ENV{"NIX_ALL_PATCHES"};
if (defined $allPatchesFile) {
my (%dummy, %allPatches);
readManifest("$patchesPath/all-patches", \%dummy, \%allPatches)
if -f $allPatchesFile;
copyPatches \%dstPatches, \%allPatches;
writeManifest($allPatchesFile, {}, \%allPatches, 0);
}
writeManifest $dstManifest, \%dstNarFiles, \%dstPatches; writeManifest $dstManifest, \%dstNarFiles, \%dstPatches;