Bug 689318 - Using full path in scripts like pdf2ps etc.?
Summary: Using full path in scripts like pdf2ps etc.?
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: General (show other bugs)
Version: master
Hardware: All All
: P4 normal
Assignee: Default assignee
URL: http://www.cups.org/str.php?L1125
Keywords:
Depends on:
Blocks: 689315
  Show dependency tree
 
Reported: 2007-07-04 03:06 UTC by Till Kamppeter
Modified: 2008-12-19 08:31 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
Let the scripts call Ghostscript from the same directory (15.74 KB, patch)
2007-07-04 04:23 UTC, Till Kamppeter
Details | Diff
Offending PS file (31.94 KB, application/postscript)
2007-07-04 08:37 UTC, Till Kamppeter
Details

Note You need to log in before you can comment on or make changes to this bug.
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.