From c53898cb650d14f9d888e28e48496e15db00fb47 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 31 Dec 2004 11:07:12 +0000 Subject: [PATCH] * If a patch already exists, it must still be included in the manifest. --- scripts/generate-patches.pl | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/scripts/generate-patches.pl b/scripts/generate-patches.pl index 4b91884d0..68d3f20db 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"; - 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"; + if (-e "$patchesDir/$finalName") { + print " not copying, already exists\n"; + } - rename("$patchesDir/$finalName.tmp", "$patchesDir/$finalName") - or die "cannot rename $patchesDir/$finalName.tmp"; + else { + + 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,