From c53898cb650d14f9d888e28e48496e15db00fb47 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 31 Dec 2004 11:07:12 +0000 Subject: * If a patch already exists, it must still be included in the manifest. --- scripts/generate-patches.pl | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'scripts') diff --git a/scripts/generate-patches.pl b/scripts/generate-patches.pl index 4b91884d0af7..68d3f20db9a0 100755 --- a/scripts/generate-patches.pl +++ b/scripts/generate-patches.pl @@ -215,18 +215,21 @@ foreach my $p (keys %dstOutPaths) { my $finalName = "$narDiffHash-$name-$closestVersion-to-$version.nar-bsdiff"; + print " size $narDiffSize; full size $dstNarBz2Size\n"; + if (-e "$patchesDir/$finalName") { print " not copying, already exists\n"; - next; } - print " size $narDiffSize; full size $dstNarBz2Size\n"; - - system("cp '$tmpdir/DIFF' '$patchesDir/$finalName.tmp'") == 0 - or die "cannot copy diff"; + else { - rename("$patchesDir/$finalName.tmp", "$patchesDir/$finalName") - or die "cannot rename $patchesDir/$finalName.tmp"; + system("cp '$tmpdir/DIFF' '$patchesDir/$finalName.tmp'") == 0 + or die "cannot copy diff"; + + rename("$patchesDir/$finalName.tmp", "$patchesDir/$finalName") + or die "cannot rename $patchesDir/$finalName.tmp"; + + } # Add the patch to the manifest. addPatch \%dstPatches, $p, -- cgit 1.4.1