[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#224863: xdvi: wrapper script creates temporary file in wrong directory



Package: tetex-bin
Version: 2.0.2-5.1
Severity: normal
Tags: patch

The wrapper in /usr/bin/xdvi helpfully uncompresses gzip'ed files, but
it does it in the current directory, rather than in /tmp as all sane
programs should do.  I think this is a misfeature of perl in
File::Temp::tempfile: if you give it an explicit template, it tries to
put the temporary file in the current directory.  You could pass a DIR
argument, but it's probably better to drop all the arguments, since
they're unnecessary.

Here's a patch.

--- /usr/bin/xdvi       2003-11-13 18:33:29.000000000 -0500
+++ xdvi        2003-12-22 21:36:12.000000000 -0500
@@ -65,9 +65,7 @@
        my @command = $1 eq 'bz2' ? qw(bzip2 -d -c) : qw(gzip -d -c);
 
        require Fcntl;
-       my $fh = tempfile( "tetexXXXXXX",
-                          SUFFIX => ".dvi",
-                          UNLINK => 1 )
+       my $fh = tempfile()
            or die "xdvi: cannot create temporary file: $!\n";
        fcntl $fh, Fcntl::F_SETFD(), 0
            or die "xdvi: disabling close-on-exec for temporary file: $!\n";


-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux lotus 2.6.0-test11 #1 Sun Nov 30 15:03:31 EST 2003 i686
Locale: LANG=C, LC_CTYPE=C

Versions of packages tetex-bin depends on:
ii  debconf                    1.3.22        Debian configuration management sy
ii  debianutils                2.6.1         Miscellaneous utilities specific t
ii  dpkg                       1.10.18       Package maintenance system for Deb
ii  ed                         0.2-20        The classic unix line editor
ii  libc6                      2.3.2.ds1-10  GNU C Library: Shared libraries an
ii  libgcc1                    1:3.3.3-0pre0 GCC support library
ii  libkpathsea3               2.0.2-5.1     path search library for teTeX (run
ii  libpng12-0                 1.2.5.0-4     PNG library - runtime
ii  libstdc++5                 1:3.3.3-0pre0 The GNU Standard C++ Library v3
ii  libwww0                    5.4.0-9       The W3C WWW library
ii  libxaw7                    4.2.1-14      X Athena widget set library
ii  mime-support               3.23-1        MIME files 'mime.types' & 'mailcap
ii  perl                       5.8.2-2       Larry Wall's Practical Extraction 
ii  t1lib1                     1.3.1-6       Type 1 font rasterizer library - r
ii  tetex-base                 2.0.2-5.1     Basic library files of teTeX
ii  xlibs                      4.2.1-14      X Window System client libraries
ii  zlib1g                     1:1.2.1-3     compression library - runtime

-- debconf information:
* tetex-bin/hyphen: french[=patois], ngerman[=naustrian-neue_Rechtschreibung]
  tetex-bin/oldcfg: true
  tetex-bin/upd_map: true
  tetex-bin/cnf_name: 
  tetex-bin/fmtutil: true
* tetex-bin/use_debconf: true
* tetex-bin/groupname: users
  tetex-bin/userperm: false
  tetex-bin/groupperm: true
* tetex-bin/lsr-perms: true
* tetex-bin/texmf: true




Reply to: