Преглед изворни кода

Minor tweak so that when patch 2.5.4 is manually used to apply a diff, it
doesn't get applied multiple times.

Adam Heath пре 25 година
родитељ
комит
c0c47663f1
3 измењених фајлова са 12 додато и 1 уклоњено
  1. 6 0
      ChangeLog
  2. 2 0
      debian/changelog
  3. 4 1
      scripts/dpkg-source.pl

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+Sun Dec 24 01:00:59 CST 2000 2000 Adam Heath <doogie@debian.org>
+
+  * scripts/dpkg-source.pl: Minor tweak so that when patch 2.5.4 is
+    manually used to apply a diff, it doesn't get applied multiple
+    times.
+
 Sat Dec 23 23:28:52 CST 2000 Adam Heath <doogie@debian.org>
 
   * utils/start-stop-daemon.c: Add --nicelevel, to alter a

+ 2 - 0
debian/changelog

@@ -1,5 +1,7 @@
 dpkg (1.8.0) unstable; urgency=low
 
+  * Minor tweak so that when patch 2.5.4 is manually used to apply a diff,
+    it doesn't get applied multiple times.  Closes: #65021
   * Add --nicelevel to start-stop-daemon, to alter a programs priority
     before starting.  Closes: #65191.
   * Document that --largemem is the default, and that the test point is

+ 4 - 1
scripts/dpkg-source.pl

@@ -368,8 +368,10 @@ if ($opmode eq 'build') {
                 $type{$fn}= 'plain file';
                 if (!lstat("$origdir/$fn")) {
                     $! == ENOENT || &syserr("cannot stat orig file $origdir/$fn");
+		    $ofn= '/dev/null';
                     $ofnread= '/dev/null';
                 } elsif (-f _) {
+		    $ofn= "$basedirname.orig/$fn";
                     $ofnread= "$origdir/$fn";
                 } else {
                     &unrepdiff2("something else","plain file");
@@ -378,9 +380,10 @@ if ($opmode eq 'build') {
                 defined($c3= open(DIFFGEN,"-|")) || &syserr("fork for diff");
                 if (!$c3) {
 		    $ENV{'LANG'}= 'C';
+		    $ENV{'LC_ALL'}= 'C';
                     exec('diff','-u',
                          '-L',"$basedirname.orig/$fn",
-                         '-L',"$basedirname/$fn",
+                         '-L',"$ofn",
                          '--',"$ofnread","$dir/$fn"); &syserr("exec diff");
                 }
                 $difflinefound= 0;