Bug 238761

Summary: /usr/bin/dvipdft always bails out with 'exit 1'.
Product: [Fedora] Fedora Reporter: Michal Jaegermann <michal>
Component: tetexAssignee: Jindrich Novy <jnovy>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: low Docs Contact:
Priority: medium    
Version: rawhideCC: pknirsch
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-05-04 11:27:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michal Jaegermann 2007-05-02 20:17:11 UTC
Description of problem:

The script in question has on line 34

tmpdir=`mktemp -d ${TMP-/tmp}/$progname.XXXXXX`

So far so good but starting with line 94 there is this:

     94 mkdir "$tmpdir" || {
     95   echo "$progname: failed to create temp directory." >&2
     96   exit 1
     97 }

and that obviously terminates as "$tmpdir" already exists created
by 'mktemp'.  For an added attraction it also leaves behind "$tmpdir"
as a regular exit is not trapped.

There four lines are preceded by a comment
# before we create the tmpdir, set trap for cleanup
followed by a corresponding 'trap' statement (which traps only
some signals).

Replacing on line 94 'mkdir' with 'mkdir -p' makes this script
to work but clearly  "$tmpdir" creation was supposed to happen
after that 'trap' and not much earlier.  The breakage looks
like a result of some "fix" for an unsafe making of "$tmpdir".

Version-Release number of selected component (if applicable):
tetex-3.0-39.fc7 and earlier too

Comment 1 Jindrich Novy 2007-05-04 11:27:29 UTC
Should be fixed in rawhide. Thanks.