Bug 689318

Summary: Using full path in scripts like pdf2ps etc.?
Product: Ghostscript Reporter: Till Kamppeter <till.kamppeter>
Component: GeneralAssignee: Default assignee <ghostpdl-bugs>
Status: NOTIFIED FIXED    
Severity: normal    
Priority: P4    
Version: master   
Hardware: All   
OS: All   
URL: http://www.cups.org/str.php?L1125
Customer: Word Size: ---
Bug Depends on:    
Bug Blocks: 689315    
Attachments: Let the scripts call Ghostscript from the same directory
Offending PS file

Description Till Kamppeter 2007-07-04 03:06:13 UTC
See

http://www.cups.org/str.php?L1125

------------------------------------------------------------------------------
the scripts which call the gs executable (like pdf2ps or ps2ps among others)
usually call gs with "exec gs $OPTIONS (...)"

in some cases the gs in the path may not be the gs the script was created with.
ie calling /usr/local/bin/pdf2ps uses /usr/bin/gs instead of using
/usr/local/bin/gs because /usr/local/bin is not in the user's path.

this could be avoided by using full paths in these scripts (i don't know if it's
feasible easily though but if it is it would be nice)
------------------------------------------------------------------------------

The attached patch lets the scripts search for Ghostscript in the same directory
 as the script itself.
Comment 1 Till Kamppeter 2007-07-04 04:23:39 UTC
Created attachment 3138 [details]
Let the scripts call Ghostscript from the same directory
Comment 2 Ray Johnston 2007-07-04 08:02:16 UTC
Note that since this is intended for GPL Ghostscript, it shouldn't mention
"ESP Ghostscript". Please use either "GPL Ghostscript" or just "Ghostscript".
Comment 3 Till Kamppeter 2007-07-04 08:37:07 UTC
Created attachment 3147 [details]
Offending PS file
Comment 4 Till Kamppeter 2007-07-04 08:42:29 UTC
Comment on attachment 3147 [details]
Offending PS file

Sorry, the patch was for another bug, so ignore it.
Comment 5 Till Kamppeter 2007-07-04 10:34:47 UTC
The attached patch is not 100% correct. The string gs (not the variable gs) must
be replaced by $GS_EXECUTABLE, so that the scripts will also work if the
Ghostscript executable has a non-standard name.
Comment 6 Till Kamppeter 2007-07-05 12:05:04 UTC
Fixed in rev 8107.