[SCM] Debian packaging for latexdiff branch, master, updated. debian/0.5-4-24-g2891c57

David Bremner bremner at debian.org
Fri May 3 01:38:05 UTC 2013


The following commit has been merged in the master branch:
commit f67f87ebd6ef488b33a203e56612bbb01b60f2ec
Author: David Bremner <bremner at debian.org>
Date:   Thu May 2 22:08:21 2013 -0300

    patch: replace use of system("\cp...")
    
    Because it would be icky even if it didn't have extra backslashes.

diff --git a/debian/patches/file-copy.patch b/debian/patches/file-copy.patch
new file mode 100644
index 0000000..4ce7798
--- /dev/null
+++ b/debian/patches/file-copy.patch
@@ -0,0 +1,52 @@
+From 6c3416cb31e0d880ed51594ec20cba2d774b9d8b Mon Sep 17 00:00:00 2001
+From: David Bremner <bremner at debian.org>
+Date: Thu, 2 May 2013 21:42:37 -0300
+Subject: [PATCH] replace use of system("cp ...") with File::Copy
+
+This had to be patched in any case because the original "\cp" is
+passing a control-p character to the shell.  I decided to replace it
+wiht File::Copy to avoid an extra shell process and also to hopefully
+be a bit more portable. File::Copy has been in core since 5.002
+(i.e. forever) so it should not be a problem.
+---
+ latexdiff-vc | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/latexdiff-vc b/latexdiff-vc
+index 16b0dea..9881f25 100755
+--- a/latexdiff-vc
++++ b/latexdiff-vc
+@@ -38,6 +38,8 @@ use Getopt::Long ;
+ use Pod::Usage qw/pod2usage/ ;
+ use File::Temp qw/tempdir/ ;
+ use File::Basename qw/dirname/;
++use File::Copy;
++
+ use strict ;
+ use warnings ;
+ 
+@@ -233,7 +235,7 @@ while ( $infile=$file2=shift @files ) {
+     ### system("$diffcmd$revs[0] $infile| $patchcmd -o$file1") ;
+     if (system("$diffcmd$revs[0] $infile | $patchcmd -o$file1")==0  and -z $file1 ) {
+       # no differences detected, i.e. file is equal to current version
+-      system("\cp $infile $file1");
++      copy($infile,$file1) || die "copy failed: $!";
+     }
+   } elsif ( scalar(@revs) == 2 ) {
+     ($file1=$infile) =~ s/\.(tex|bbl)/-oldtmp-$$.$1/ ;
+@@ -241,10 +243,10 @@ while ( $infile=$file2=shift @files ) {
+     push @tmpfiles,$file2;
+       ;
+     if (system("$diffcmd$revs[1] $infile | $patchcmd -o$file2")==0 and -z $file2 ) {
+-      system("\cp $infile $file2");
++      copy($infile,$file2) || die "copy failed: $!";
+     }
+     if (system("$diffcmd$revs[0] $infile | $patchcmd -o$file1")==0 and -z $file1 ) {
+-	system("\cp $infile $file1");
++      copy($infile,$file1) || die "copy failed: $!";
+     };
+   }
+ 
+-- 
+1.8.2.rc2
+
diff --git a/debian/patches/series b/debian/patches/series
index a4116e0..a8aac34 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 0001-Make-the-choice-of-dvips-or-pdftex-optional-conditio.patch
 pod-error.patch
+file-copy.patch

-- 
Debian packaging for latexdiff



More information about the Pkg-perl-cvs-commits mailing list