about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2004-12-31T11·07+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2004-12-31T11·07+0000
commitc53898cb650d14f9d888e28e48496e15db00fb47 (patch)
treefcbd6aab03ecd5baa2bf6d72c49b3ea27834584c /scripts
parent35b76a81c42df1f07f4de711eb1bcf681eac3c3a (diff)
* If a patch already exists, it must still be included in the manifest.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/generate-patches.pl17
1 files changed, 10 insertions, 7 deletions
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,