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

Agustin Martin Domingo agmartin at debian.org
Thu Jun 5 13:44:02 UTC 2008


The following commit has been merged in the experimental branch:
commit 870695b44b73fa58ec15d5df6db3b5486d32e34e
Author: Agustin Martin Domingo <agmartin at debian.org>
Date:   Thu Jun 5 14:02:23 2008 +0200

    Use mktemp in doc/Makedoc.sh and  File::Temp::tempdir in lib/LinuxDocTools.pm. Add Vcs fields.
    
        * Use mktemp to create doc build temporary dir in doc dir
        * use File::Temp::tempdir in lib/LinuxDocTools.pm
        * Add Vcs fields
        * Bump VERSION

diff --git a/VERSION b/VERSION
index 0d50a5c..03b4c75 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.9.31
+0.9.50
diff --git a/debian/changelog b/debian/changelog
index 9bd7fd0..5b08f31 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,31 @@
+linuxdoc-tools (0.9.50) unstable; urgency=low
+
+  * lib/LinuxDocTools.pm:
+    - First cut of a major rewrite
+    - ldt_searchfile: New function to look for readable files in
+      different locations. Make sgml catalogs, backends, entities,
+      styles  and mapping searches use it. $file existence check
+      will also use it.
+    - Move dtd search from (process_file) to separate functions. latin1
+      to sgml conversion moved to a new ldt_latin1tosgml function.
+    - Use File::Temp::tempdir for temporary dir creation.
+    - Avoid FileHandle package use.
+    - Define intermediate file names in a single place outside of the
+      functions where they are used. This should simplify renaming them.
+    - Code reformatted, trailing whitespace removed, comments improved.
+  * lib/LinuxDocTools.pm, 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.
+  * doc/Makedoc.sh:
+    - Use mktemp to create doc build temporary dir
+  * debian/control:
+    - Add Vcs fields
+
+ -- Agustin Martin Domingo <agmartin at debian.org>  Thu, 05 Jun 2008 13:53:58 +0200
+
 linuxdoc-tools (0.9.31) unstable; urgency=low
 
   * doc/Makedoc.sh:
diff --git a/debian/control b/debian/control
index 729eda8..4a6f051 100644
--- a/debian/control
+++ b/debian/control
@@ -4,6 +4,8 @@ Priority: optional
 Maintainer: Debian XML/SGML Group <debian-xml-sgml-pkgs at lists.alioth.debian.org>
 Uploaders: Agustin Martin Domingo <agmartin at debian.org>
 Standards-Version: 3.7.3
+Vcs-Git: git://git.debian.org/git/users/agmartin/linuxdoc-tools.git
+Vcs-Browser: http://git.debian.org/?p=users/agmartin/linuxdoc-tools.git;a=summary
 Build-Depends: debhelper (>=4 ), perl, flex, gawk|mawk, sp|opensp, texinfo, groff (>= 1.15.3.1),
  texlive-base-bin, texlive-latex-recommended, texlive-fonts-recommended
 
diff --git a/doc/Makedoc.sh b/doc/Makedoc.sh
index 7dabca8..1f16189 100644
--- a/doc/Makedoc.sh
+++ b/doc/Makedoc.sh
@@ -1,9 +1,10 @@
 #! /bin/bash
 
-export TMPDIR=/tmp/$$;
+export TMPDIR=`mktemp -d ${TMPDIR:-/tmp}/ldt.XXXXXXXXXX`;
 
+echo "-------- Building linuxdoc-tools docs ---------"
 echo "Installed tree: $PREFIX"
-echo "using temporary directory: $TMPDIR"
+echo "Using temporary directory: $TMPDIR"
 
 function abort()
 {
@@ -12,13 +13,14 @@ function abort()
 
 trap 'abort' 1 2 3 6 9 15
 
+
 # export BINDIR=${BINDIR}
 # export DATADIR=${DATADIR}
 export PKGDATADIR=${DATADIR}/linuxdoc-tools
 export PERL5LIB=${DATADIR}/linuxdoc-tools:${TMPDIR}
 
-mkdir -m 700 $TMPDIR || exit 1;
 mkdir $TMPDIR/Text
+
 sed < ../entity-map/EntityMap.pm.in >$TMPDIR/Text/EntityMap.pm \
  -e 's|\@localentitymapdir\@|'${DATADIR}'/entity-map|g' \
  -e 's|\@entitymapdir\@|'${DATADIR}'/entity-map/0.1.0|g'
@@ -78,10 +80,12 @@ if [ -n "`which groff`" ]; then
 	ln -s $TMPDIR/linuxdoc $TMPDIR/sgml2txt
 	$TMPDIR/sgml2txt -b 1 ./guide
 fi
+
 if [ -n "`which latex`" ]; then
 	ln -s $TMPDIR/linuxdoc $TMPDIR/sgml2latex
 	$TMPDIR/sgml2latex --pass="\usepackage{times}" -o dvi ./guide
 fi
+
 if [ -n "`which dvips`" ]; then
 	dvips -t letter -o ./guide.ps ./guide.dvi
 	if [ -n "`which gzip`" -a -f ./guide.ps ]; then
diff --git a/lib/LinuxDocTools.pm b/lib/LinuxDocTools.pm
index 6e92f90..120fbb2 100755
--- a/lib/LinuxDocTools.pm
+++ b/lib/LinuxDocTools.pm
@@ -40,8 +40,9 @@ but the encapsulation should provide for a simple interface for other users as w
 
 =cut
 
-use File::Basename;
 use File::Copy;
+use File::Temp qw(tempdir);
+use File::Basename qw(fileparse);
 use LinuxDocTools::Lang;
 use LinuxDocTools::Utils qw(process_options usage cleanup trap_signals remove_tmpfiles create_temp);
 use LinuxDocTools::Vars;
@@ -482,14 +483,8 @@ sub process_file {
   print STDERR "DTD: " . $dtd . "\n" if $global->{debug};
 
   # Prepare temporary directory
-  my $tmpdir = $ENV{'TMPDIR'} || '/tmp';
-  $tmpdir = $tmpdir . '/' . 'linuxdoc-dir-' . $$;
-  if ( -e $tmpdir ) {
-    die "$error_header: $tmpdir already exists. Aborting ...\n";
-  } else {
-    mkdir($tmpdir, 0700) ||
-      die "$error_header: Temporary files can not be created. Aborting ...\n";
-  }
+  my $tmpdir    = $ENV{'TMPDIR'} || '/tmp';
+  $tmpdir       = tempdir("linuxdoc-tools.XXXXXXXXXX", DIR => "$tmpdir");
 
   # Set common base name for temp files and temp file names
   my $tmpbase   = $global->{tmpbase} = $tmpdir . '/sgmltmp.' . $filename;

-- 
linuxdoc-tools package for Debian.



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