ooo-build r15384 - in trunk: . patches
- From: tml svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r15384 - in trunk: . patches
- Date: Fri, 20 Feb 2009 10:25:54 +0000 (UTC)
Author: tml
Date: Fri Feb 20 10:25:54 2009
New Revision: 15384
URL: http://svn.gnome.org/viewvc/ooo-build?rev=15384&view=rev
Log:
2009-02-20 Tor Lillqvist <tml novell com>
* patches/apply.pl.in: Work by Fridrich and me to make patching
more reliable on Cygwin now when patches tend to have random stray
CRs. On Cygwin, always run the diff files through a unix2dos
filter in front of patch. This causes consistent CRLF line
endings, and the patch program will then strip away the CRs
consistently. Patch will unfortunately print a message about the
stripping of trailing CRs for each file patched. Should improve
the mechanism some day. Maybe just slurp in the diff files into
the Perl process and do the stray CR stripping there before
pushing the diff out to the patch process. That would save a
couple of process creations per diff file, too.
Modified:
trunk/ChangeLog
trunk/patches/apply.pl.in
Modified: trunk/patches/apply.pl.in
==============================================================================
--- trunk/patches/apply.pl.in (original)
+++ trunk/patches/apply.pl.in Fri Feb 20 10:25:54 2009
@@ -63,7 +63,6 @@
my $base_cmd = shift;
my $patch_file = basename($patch);
my $cmd_output = "";
- my $cmd_suffix = "";
# short circuit in sloppy patching mode, when there is no file to patch
# speeds up, and calms down the split build pleasingly
@@ -79,13 +78,15 @@
if ($quiet)
{ $cmd_output = " > /dev/null " }
- $cmd_pipe = " < $patch";
- my $cmd = "( $base_cmd --dry-run ".$cmd_output.$cmd_suffix.")".$cmd_pipe;
+ my $cmd_input = "< $patch";
+ $cmd_input = 'unix2dos ' . $cmd_input . ' |' if $^O =~ /cygwin/i;
+
+ my $cmd = $cmd_input." $base_cmd --dry-run ".$cmd_output;
print "$cmd\n" unless $quiet;
system ($cmd) && die "Testing patch $patch_file failed.";
- $cmd = "( $base_cmd > /dev/null".$cmd_suffix.")".$cmd_pipe;
+ $cmd = $cmd_input." $base_cmd > /dev/null";
if($quiet)
{ print "applying..." }
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]