[xml/sgml-commit] [SCM] linuxdoc-tools package for Debian. branch, master, updated. debian/0.9.31-5-g870695b

Agustin Martin Domingo agmartin at debian.org
Mon Jun 9 10:20:30 UTC 2008


The following commit has been merged in the master branch:
commit 82c089d8d6cf781431d1b04371fb3a7d20904539
Author: Agustin Martin Domingo <agmartin at debian.org>
Date:   Thu May 29 13:19:47 2008 +0200

    Check for return code of 'system' calls. Fix bibtex call.
    
    * lib/dist/fmt_info.pl, lib/dist/fmt_latex2e.pl:
      - Check system calls for return codes and proceed as appropriate.
      - Improve error messages, making them more consistent.
    * lib/dist/fmt_latex2e.pl:
      - Fix bibtex call, should use basename.
      - Minor cosmetic changes.

diff --git a/lib/dist/fmt_info.pl b/lib/dist/fmt_info.pl
index 2684059..50c13b2 100644
--- a/lib/dist/fmt_info.pl
+++ b/lib/dist/fmt_info.pl
@@ -99,6 +99,7 @@ $info->{postASP} = sub {
 # ------------------------------------------------------------------
   my $INFILE    = shift;
   my $OUTFILE;
+  my $msgheader = "fmt_lyx::postASP";
 
   my $awk       = $main::progs->{AWK};
   my $awkfilter = "$main::DataDir" . "/filters/info-postASP.awk";
@@ -111,8 +112,10 @@ $info->{postASP} = sub {
   copy ($INFILE, $OUTFILE);
   close $OUTFILE;
 
-  system ("$awk -v INFO=$infofile -f $awkfilter $awkin > $texifile");
-  system ("makeinfo $texifile -o $infofile");
+  system ("$awk -v INFO=$infofile -f $awkfilter $awkin > $texifile") == 0
+    or die "$msgheader: Failed to run awk filter. Aborting ...\n";
+  system ("makeinfo $texifile -o $infofile") == 0
+    or die "$msgheader: Failed to run makeinfo. Aborting ...\n";
 
   return 0;
 };
diff --git a/lib/dist/fmt_latex2e.pl b/lib/dist/fmt_latex2e.pl
index 27036f3..9234000 100644
--- a/lib/dist/fmt_latex2e.pl
+++ b/lib/dist/fmt_latex2e.pl
@@ -227,6 +227,7 @@ $latex2e->{postASP} = sub
   my $filename     = $global->{filename};
   my $tmplatexdir  = $global->{tmpbase} . "-latex-" . $$ . ".dir";
   my $tmplatexnam  = $tmplatexdir . "/" . $filename;
+  my $msgheader    = "fmt_latex2e::postASP";
   my @epsfiles = ();
   my @texlines = ();
   my @urldefines = ();
@@ -465,10 +466,21 @@ $latex2e->{postASP} = sub
   }
   my ($suppress) = $latex2e->{quick} ? "" : ' >/dev/null';
 
-  system $latexcommand . $suppress  || die "LaTeX problem\n";
-  $latex2e->{bibtex} && system "bibtex $filename.tex";
-  $latex2e->{quick} || system $latexcommand . ' >/dev/null';
-  $latex2e->{quick} || system $latexcommand;
+  system ($latexcommand . $suppress) == 0
+    or die "$msgheader: LaTeX first run problem. Aborting ...\n";
+
+  if ( $latex2e->{bibtex} ) {
+    system ( "bibtex $filename" ) == 0
+      or print STDERR "$msgheader: Problems when running BibTeX. Ignoring ...\n";
+  }
+
+  unless ( $latex2e->{quick} ){
+    system ($latexcommand . ' >/dev/null') == 0
+      or die "$msgheader: LaTeX second run problem. Aborting ...\n";
+    system ( $latexcommand ) == 0
+      or die "$msgheader: LaTeX third run problem. Aborting ...\n";
+  }
+
   if ( ! $global->{debug} ) {
     my @suffixes = qw(log blg aux toc lof lot dlog bbl out);
     for my $suf (@suffixes) {

-- 
linuxdoc-tools package for Debian.



More information about the debian-xml-sgml-commit mailing list