From f42a505ab71ba421797ac511e1221ccbefef8ab9 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sun, 5 Dec 2010 17:36:02 +0000 Subject: * Add a script `nix-generate-patches'. * Fix the binary patching test. --- scripts/Makefile.am | 5 +++-- scripts/nix-generate-patches.in | 42 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 scripts/nix-generate-patches.in (limited to 'scripts') diff --git a/scripts/Makefile.am b/scripts/Makefile.am index c55f922120..5f20dcfaf7 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -1,7 +1,7 @@ bin_SCRIPTS = nix-collect-garbage \ nix-pull nix-push nix-prefetch-url \ nix-install-package nix-channel nix-build \ - nix-copy-closure + nix-copy-closure nix-generate-patches noinst_SCRIPTS = nix-profile.sh GeneratePatches.pm \ find-runtime-roots.pl build-remote.pl nix-reduce-build \ @@ -41,4 +41,5 @@ EXTRA_DIST = nix-collect-garbage.in \ find-runtime-roots.pl.in \ build-remote.pl.in \ nix-reduce-build.in \ - nix-http-export.cgi.in + nix-http-export.cgi.in \ + nix-generate-patches.in diff --git a/scripts/nix-generate-patches.in b/scripts/nix-generate-patches.in new file mode 100644 index 0000000000..d22098a109 --- /dev/null +++ b/scripts/nix-generate-patches.in @@ -0,0 +1,42 @@ +#! @perl@ -w -I@libexecdir@/nix + +use strict; +use File::Temp qw(tempdir); +use readmanifest; +use GeneratePatches; + +if (scalar @ARGV != 5) { + print STDERR < 1, TMPDIR => 1) + or die "cannot create a temporary directory"; + +generatePatches \%srcNarFiles, \%dstNarFiles, \%srcPatches, \%dstPatches, + $narPath, $patchesPath, $patchesURL, $tmpDir; + +propagatePatches \%srcPatches, \%dstNarFiles, \%dstPatches; + +writeManifest $dstManifest, \%dstNarFiles, \%dstPatches; -- cgit 1.4.1