| Summary: | Hard coded paths in shell scripts SetConfig.sh | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Youmm P. <kototamo> | ||||
| Component: | TPTP | Assignee: | Bing Xu <xubing> | ||||
| Status: | CLOSED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P1 | CC: | igor.alelekov, jcayne, jkubasta | ||||
| Version: | unspecified | Keywords: | plan | ||||
| Target Milestone: | --- | Flags: | jcayne:
review+
|
||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | closed460 | ||||||
| Attachments: |
|
||||||
|
Description
Youmm P.
The script cannot be dependent on the TPTP_AC_HOME environment variable since this may be undefined. For example: when the Agent Controller is being repackaged and installed via InstallShield. We purposely remove the need for users to define any environment variable when setting up the AC. This will prevent the config generator from pointing to an older, possibly uninstalled AC due to a system-defined TPTP_AC_HOME environment variable. OK. Then at least not harcoding "../lib" by using another variable or by using the position of the executable (in 'bin') to find the corresponding 'lib' directory. Adjust sizing. The relative path problem is common across Windows and Linux. It may be fixed on Linux using bash scripts but not as trivial on Windows. I am open to suggestions on how to get this fixed on Windows. On Linux, I can use the $0 operator to determine the path of the SetConfig.sh script. Unfortunately this may not always return a fully qualified path. This may cause the config generator to insert relative paths into the config file. The current design of the AC config file requires fully qualified paths in order for the AC to be started by any user from any directory. I may be able to workaround this by prepending the $PWD operator as well but this will requires a significant change in the SetConfig.sh script which is a risky change considering we are closing down TPTP 4.4.1. We will need a common solution to cover both Windows and Linux. In the meantime, since we have a workaround available, can we agree on having this deferred to TPTP 4.5? For Linux something like this would be fine: FULL_PATH=`cd "\`dirname "$0"\`" > /dev/null; pwd; cd - > /dev/null ` For Windows I don't know neither. "In the meantime, since we have a workaround available, can we agree on having this deferred to TPTP 4.5?" => I suppose the question is not intended for me but if it this yes, of course, you can deferred the fix. Hi Bing. I have transferred my bugs to you for triage. Thanks. On Windows, the setconfig should only be run from the <Agent Controller Installation Dir>/bin. This was specified in the getting_started.html shipped with AC. TPTP AC is installed by unzipping the file and the setconfig.bat script won't be able to find out the installation directory. Using '../lib/config.jar' in setconfig.bat seems reasonable. The other choice is to ask user to specify the AC installation directory at the beginning of setconfig. If there is no clean solution to this problem and given that the getting_started.html guide has stated that the setconfig must be run from the <install dir>/bin, I think we should close this defect. Igor, do you have a preference? I agree with Bing that SetConfig should be run from the %TPTP_AC_HOME%\bin directory as it is recommended in the getting_started.html.
But I would suggest to change this script and error messag which confuses users ("JAXP not found.."). This is also important for IAC where config.jar resides in another plugin.
I suggest to add check if ../lib/config.jar is present and print corresponding message before JAXP checking.
Created attachment 91547 [details]
Patch to add new error message when config.jar can't be found
Joe, can you review this patch. Thanks. Patch looks good. Patch checked into HEAD. As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this enhancement/defect has been resolved and unverified for more than 1 year and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open. |