Bug 46771 - [PATCH] fop fails if JAVACMD_OPTS is set
Summary: [PATCH] fop fails if JAVACMD_OPTS is set
Status: NEW
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: general (show other bugs)
Version: 0.95
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-26 04:48 UTC by Michal Vyskocil
Modified: 2012-04-11 03:20 UTC (History)
0 users



Attachments
Allow to set a JAVACMD_OPTS on jpackage.org compatible systems (729 bytes, patch)
2009-02-26 04:48 UTC, Michal Vyskocil
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Vyskocil 2009-02-26 04:48:22 UTC
Created attachment 23313 [details]
Allow to set a JAVACMD_OPTS on jpackage.org compatible systems

Moved from https://bugzilla.novell.com/show_bug.cgi?id=467866

The jpackage-utils contatenace the JAVACMD_OPTS with JAVACMD, so on rpm distributions with something in JAVACMD_OPTS in /etc/java/java.conf the following test in /usr/share/fop/fop fails:

if [ ! -x "$JAVACMD" ] ; then
  echo "Error: JAVA_HOME is not defined correctly."
  echo "  We cannot execute $JAVACMD"
  exit 1
fi

Attached patch splits JAVACMD variable in executable test and remove the \"\" from exec.
Comment 1 Vincent Hennebert 2009-02-27 03:43:58 UTC
Hi,

It looks like it is a jpackage.org-specific problem. Basically the java-functions script referred to in the upstream bug should probably not concatenate $JAVACMD_OPTS to JAVACMD. As its name indicates JAVACMD refers to the executable, not to possible command arguments.

The fop script is based on the script shipped with ant, so that problem that's occurring with fop will most probably occur with ant as well. The removal of quotes in fop_exec_command worries me: there's certainly a good reason why they were added in the first place, probably to handle paths with spaces in them. I'm not keen to modify the script without a good reason, as it's designed to work on all types of Unix platforms, even those with ancient tools and shells. If we change it then it needs to be re-tested on all those platforms, which we don't have access to.

I'm happy to hear comments or opinions about this, but I would close the bug as invalid.

Thanks,
Vincent
Comment 2 Glenn Adams 2012-04-07 01:43:06 UTC
resetting P2 open bugs to P3 pending further review
Comment 3 Glenn Adams 2012-04-11 03:20:15 UTC
increase priority for bugs with a patch