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

Bug#279042: Bug#273789: tetex-base: fmtutil.cnf not found



Hello Hilmar!

On Mon, Nov 08, 2004 at 11:48:34AM +0100, Hilmar Preusse wrote:
> On 08.11.04 Frank Küster (frank@debian.org) wrote:
> > Thomas Heimroth <theimrot@gmx.de> schrieb:
> 
> Hello *!
> 
> > >> Does an strace over the xdvi.bin binary tell you more?
> > 
> > strace is a program that records ("traces") all the calls to system
> > functions, all file openings etc. that a command initiates, and writes
> > them to stderr, or to a file. Writing to a file is usually much
> > better. You would therefore use
> > 
> > strace -o xdvi.trace xdvi $irgendeine-dvi-Datei.dvi
This creates the message:
strace: exec: Permission denied
> > 
> > (or simply
> > 
> > strace -o xdvi.trace xdvi
This creates the message, when I choose the dvi-file:
xdvi:xdvi.bin terminated abnormally:11

> > 
> I wouldn't do it that way. There is the shell program, which sets
> some ENV variables IIRC. I think it's a better idea to copy
> /usr/bin/xdvi into the home dir, edit it appropriatly and then call
> it typing "./xdvi filename".
> 
> The first means replace line 75 by
> 
> exec strace -o xdvi.trace xdvi.bin $NAMEOPT $args "$filename" || exit 1
> 
> and line 77 by
> 
> exec strace -o xdvi.trace xdvi.bin $NAMEOPT $args || exit 1
> 
I have replace this lines, but I get strange messages, the the system don't know
$NAMEOPT.

THis are the messages:
command28$ xdvi /mnt/skyliner/workspace/Latex/test.dvi 
Unquoted string "strace" may clash with future reserved word at /usr/bin/xdvi
line 74.
Unquoted string "xdvi" may clash with future reserved word at /usr/bin/xdvi line
74.
String found where operator expected at /usr/bin/xdvi line 74, near "$args
"$filename""
        (Missing operator before "$filename"?)
Unquoted string "strace" may clash with future reserved word at
/usr/bin/xdvi line 77.
Unquoted string "xdvi" may clash with future reserved word at
/usr/bin/xdvi line 77.
"my" variable $code masks earlier declaration in same scope at
/usr/bin/xdvi line 96.
Global symbol "$NAMEOPT" requires explicit package name at /usr/bin/xdvi
line 74.
Global symbol "$args" requires explicit package name at /usr/bin/xdvi
line 74.
syntax error at /usr/bin/xdvi line 74, near "$args "$filename""
Global symbol "$NAMEOPT" requires explicit package name at /usr/bin/xdvi
line 77.
Global symbol "$args" requires explicit package name at /usr/bin/xdvi
line 77.
Execution of /usr/bin/xdvi aborted due to compilation errors.

I have append the original xdvi and the edited xdvi.

Thomas

> H.
> -- 
> Tact, n.:
> 	The unsaid part of what you're thinking.
> 

-- 
+----------------------------------------------+
| Deshalb können Pinguine nicht fliegen:       |
| Was nicht fliegt, kann auch nicht abstürzen. |
|                www.linux.de                  |
+----------------------------------------------+
+----------------------------------------------+                  
| Thomas Heimroth                              |
| email: theimrot@gmx.de		       |
+----------------------------------------------+	
#! /usr/bin/perl -w

# This is the xdvi wrapper script for Debian, based on Thomas Esser's
# teTeX version 0.2.
# Debian version: Copyright Julian Gilbey, 2002.  Lots of modifications
# by Chung-chieh Shan <ken@digitas.harvard.edu>.
# Also by TSUCHIYA Masatoshi <tsuchiya@pine.kuee.kyoto-u.ac.jp>.
# Original version: Copyright Thomas Esser, 1998.
# Permission to distribute this software is given under the terms of
# the GNU general public license version 2 or later.

# Thomas writes:
# This script sets some environment variables to make sure that xdvi's
# resource file in $XDVIINPUTS/xdvi is read by xdvi.bin.
# Special care was taken to make this work for old R3, too. Therefore,
# we need to modify XAPPLRESDIR. If you are running R4 or later, you
# can set XUSERFILESEARCHPATH for user specific application default
# files. You cannot use XAPPLRESDIR for user specific application default
# files.

# Julian writes: 
# This has been rewritten in Perl so that we can mangle the arguments
# to handled gzipped dvi files, which not have errors if there are
# spaces in some arguments. XAPPLRESDIR is no longer modified.

# Stephen Gildea writes:
# Debian distributes X11R6, therefore this script should not clobber
# XAPPLRESDIR, which is for user customizations.

use strict;
use FileHandle;
use File::Basename;
use File::Spec;
use File::Temp qw/ tempfile /;

my @NAMEOPT;
if (@ARGV == 1 and ($ARGV[0] eq '-help' or $ARGV[0] eq '-version')) {
    @NAMEOPT=();
} else {
    @NAMEOPT=qw(-name xdvi);
}

$ENV{'XDVIINPUTS'} .= ":\$TEXMF/{xdvi,web2c}";

my ($xdviappfile, $xdviappdir, $xdviapppath);
$xdviappfile=`kpsewhich -progname=xdvi --format='other text files' XDvi`;
if ("$xdviappfile" ne '') {
    $xdviappdir=dirname($xdviappfile);
    $xdviapppath="$xdviappdir/%N";

    if (exists $ENV{'XFILESEARCHPATH'}) {
	$ENV{'XFILESEARCHPATH'} = "$xdviapppath:$ENV{'XFILESEARCHPATH'}";
    } else {
	$ENV{'XFILESEARCHPATH'} = "$xdviapppath:%D";
    }
}

my $status;
if (@ARGV) {
    my $filename = pop @ARGV;

    if ($filename =~ /\.(gz|Z|bz2)$/) {
	my @command = $1 eq 'bz2' ? qw(bzip2 -d -c) : qw(gzip -d -c);

	require Fcntl;
	my $fh = tempfile( UNLINK => 1 )
	    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";

	if (my $child = fork) {
	    1 while wait != $child;
	    if ($? & 255) {
	    exec strace -o xdvi.trace xdvi.bin $NAMEOPT $args "$filename" || exit 1
	    } elsif ($?) {
		my $code = $? >> 8;
	    	exec strace -o xdvi.trace xdvi.bin $NAMEOPT $args || exit 1
	    }
	} elsif (defined $child) {
	    STDOUT->fdopen( $fh, "w" );
	    exec @command, $filename;
	} else {
	    die "xdvi: fork: $!\n";
	}
	$status = system('xdvi.bin', @NAMEOPT, @ARGV, '/dev/fd/'.fileno($fh));
    } else {
	$status = system('xdvi.bin', @NAMEOPT, @ARGV, $filename);
    }
} else {
    $status = system('xdvi.bin', @NAMEOPT);
}

if ($status & 255) {
    die "xdvi: xdvi.bin terminated abnormally: $?\n";
} else {
    my $code = $? >> 8;
    exit $code;
}
#! /usr/bin/perl -w

# This is the xdvi wrapper script for Debian, based on Thomas Esser's
# teTeX version 0.2.
# Debian version: Copyright Julian Gilbey, 2002.  Lots of modifications
# by Chung-chieh Shan <ken@digitas.harvard.edu>.
# Also by TSUCHIYA Masatoshi <tsuchiya@pine.kuee.kyoto-u.ac.jp>.
# Original version: Copyright Thomas Esser, 1998.
# Permission to distribute this software is given under the terms of
# the GNU general public license version 2 or later.

# Thomas writes:
# This script sets some environment variables to make sure that xdvi's
# resource file in $XDVIINPUTS/xdvi is read by xdvi.bin.
# Special care was taken to make this work for old R3, too. Therefore,
# we need to modify XAPPLRESDIR. If you are running R4 or later, you
# can set XUSERFILESEARCHPATH for user specific application default
# files. You cannot use XAPPLRESDIR for user specific application default
# files.

# Julian writes: 
# This has been rewritten in Perl so that we can mangle the arguments
# to handled gzipped dvi files, which not have errors if there are
# spaces in some arguments. XAPPLRESDIR is no longer modified.

# Stephen Gildea writes:
# Debian distributes X11R6, therefore this script should not clobber
# XAPPLRESDIR, which is for user customizations.

use strict;
use FileHandle;
use File::Basename;
use File::Spec;
use File::Temp qw/ tempfile /;

my @NAMEOPT;
if (@ARGV == 1 and ($ARGV[0] eq '-help' or $ARGV[0] eq '-version')) {
    @NAMEOPT=();
} else {
    @NAMEOPT=qw(-name xdvi);
}

$ENV{'XDVIINPUTS'} .= ":\$TEXMF/{xdvi,web2c}";

my ($xdviappfile, $xdviappdir, $xdviapppath);
$xdviappfile=`kpsewhich -progname=xdvi --format='other text files' XDvi`;
if ("$xdviappfile" ne '') {
    $xdviappdir=dirname($xdviappfile);
    $xdviapppath="$xdviappdir/%N";

    if (exists $ENV{'XFILESEARCHPATH'}) {
	$ENV{'XFILESEARCHPATH'} = "$xdviapppath:$ENV{'XFILESEARCHPATH'}";
    } else {
	$ENV{'XFILESEARCHPATH'} = "$xdviapppath:%D";
    }
}

my $status;
if (@ARGV) {
    my $filename = pop @ARGV;

    if ($filename =~ /\.(gz|Z|bz2)$/) {
	my @command = $1 eq 'bz2' ? qw(bzip2 -d -c) : qw(gzip -d -c);

	require Fcntl;
	my $fh = tempfile( UNLINK => 1 )
	    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";

	if (my $child = fork) {
	    1 while wait != $child;
	    if ($? & 255) {
	      exec strace -o xdvi.trace xdvi.bin $NAMEOPT $args "$filename" || exit 1
	    } elsif ($?) {
		my $code = $? >> 8;
	        exec strace -o xdvi.trace xdvi.bin $NAMEOPT $args || exit 1
	    }
	} elsif (defined $child) {
	    STDOUT->fdopen( $fh, "w" );
	    exec @command, $filename;
	} else {
	    die "xdvi: fork: $!\n";
	}
	$status = system('xdvi.bin', @NAMEOPT, @ARGV, '/dev/fd/'.fileno($fh));
    } else {
	$status = system('xdvi.bin', @NAMEOPT, @ARGV, $filename);
    }
} else {
    $status = system('xdvi.bin', @NAMEOPT);
}

if ($status & 255) {
    die "xdvi: xdvi.bin terminated abnormally: $?\n";
} else {
    my $code = $? >> 8;
    exit $code;
}

Reply to: