Bug 61881

Summary: fig2dev fails to produce files with strange names
Product: [Retired] Red Hat Linux Reporter: bac
Component: transfigAssignee: Than Ngo <than>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2   
Target Milestone: ---   
Target Release: ---   
Hardware: athlon   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-11-30 21:49:45 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 bac 2002-03-25 15:18:28 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.8) Gecko/20020212

Description of problem:
Attempting to make fig2dev direct output to a filename with a space or semicolon
with PNG or GIF format fails.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Create a simple fig file with xfig, say "foo.fig".
2. fig2dev -L gif foo.fig foo\ bar.gif
3. fig2dev -L png foo.fig foo\ bar.png


Actual Results:  For step 2:

[bac@ancora tmp]$ fig2dev -L gif foo.fig foo\ bar.gif
fig2dev: error while converting image.
Command used:
  (ppmquant 256 /tmp/f2d30854.ppm | ppmtogif > foo bar.gif) 2> /tmp/f2d30854.err
Messages resulting:
  ppmtogif: bar.gif - No such file or directory
  ppmquant: making histogram...
  ppmquant: 2 colors found
  ppmquant: choosing 256 colors...
  ppmquant: mapping image to new colors...

Empty output file and empty 'foo' file are produced.

For step 3:

[bac@ancora tmp]$ fig2dev -L png foo.fig foo\ bar.png
Error: /undefinedfilename in (bar.png)
Operand stack:

Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--  
--nostringval--   2   %stopped_push   --nostringval--   --nostringval--  
--nostringval--   false   1   %stopped_push   --nostringval--   --nostringval--
Dictionary stack:
   --dict:1033/1476(ro)(G)--   --dict:0/20(G)--   --dict:83/200(L)--
Current allocation mode is local
Last OS error: 2
GNU Ghostscript 6.51: Unrecoverable error, exit code 1
Error in ghostcript command
command was: gs -q -dSAFER -sDEVICE=png16m -r80 -g259x259 -sOutputFile=foo bar.png -

Empty output file produced.

[Both steps work is the space is omitted; both fail in similar ways
with a semicolon, except that output may be found in the file 'foo'.]

Expected Results:  The output files should be successfully created.

Additional info:

This appears to be a shell quoting bug of some sort.

Comment 1 Than Ngo 2004-11-30 21:49:45 UTC
it seems to be fixed in transfig-3.2.4. i cannot reproduce this
problem in this release.