Hi Peter,

> Hi all,
> 
> For defining the 'install script' for some of my tool wrappers, I have
> mainly following http://wiki.galaxyproject.org/ToolShedToolFeatures
> and looking at one or two examples.
> 
> I've got some of my tools to work, but not all. For instance, this one
> appears not to be downloading or moving JAR files correctly:
> http://testtoolshed.g2.bx.psu.edu/view/peterjc/effectivet3/5644c28cf965
> 
> <?xml version="1.0"?>
> <tool_dependency>
>     <package name="effectiveT3" version="1.0.1">
>         <install version="1.0">
>             <actions>
>                 <!-- Set environment variable so Python script knows
> where to look -->
>                 <action type="set_environment">
>                     <environment_variable name="EFFECTIVET3"
> action="set_to">$INSTALL_DIR</environment_variable>
>                 </action>
>                 <!-- Main JAR file -->
>                 <action
> type="download_by_url">http://effectors.org/download/version/TTSS_GUI-1.0.1.jar</action>
>                 <action
> type="move_file"><source>TTSS_GUI-1.0.1.jar</source><destination>$INSTALL_DIR/</destination></action>
>                 <!-- Three model JAR files -->
>                 <action type="make_directory">$INSTALL_DIR/module</action>
>                 <action
> type="download_by_url">http://effectors.org/download/module/TTSS_ANIMAL-1.0.1.jar</action>
>                 <action
> type="move_file"><source>TTSS_ANIMAL-1.0.1.jar</source><destination>$INSTALL_DIR/module/</destination></action>
>                 <action
> type="download_by_url">http://effectors.org/download/module/TTSS_PLANT-1.0.1.jar</action>
>                 <action
> type="move_file"><source>TTSS_PLANT-1.0.1.jar</source><destination>$INSTALL_DIR/module/</destination></action>
>                 <action
> type="download_by_url">http://effectors.org/download/module/TTSS_STD-1.0.1.jar</action>
>                 <action
> type="move_file"><source>TTSS_STD-1.0.1.jar</source><destination>$INSTALL_DIR/module/</destination></action>
>             </actions>
>         </install>
>         <readme>
> Downloads effectiveT3 v1.0.1 and the three models from http://effectors.org/
>         </readme>
>     </package>
> </tool_dependency>

Afaik "download_by_url" is only supported as first action. To work
around that limitation, until its fixed, I used wget to fetch any
additional file. 

Ciao,
Björn

> Here my Python wrapper script has evidently read the $EFFECTIVET3
> environment variable (defined in the tool_dependencies.xml to point
> to the tool's $INSTALL_DIR), but the JAR file isn't there:
> 
> Effective T3 JAR file not found:
> /var/opt/buildslaves/buildslave-ec2-1/buildbot-install-test-test-tool-shed-py27/build/test/install_and_test_tool_shed_repositories/tmp/tmpYR9FXD/effectiveT3/1.0.1/peterjc/effectivet3/5644c28cf965/TTSS_GUI-1.0.1.jar
> 
> 
> My previous revision set the $EFFECTIVET3 environment variable
> at the end of the tool_dependencies.xml file, and from the test failure
> it appeared not to be getting set. My hunch is something breaks
> part way through the installation but the Tool Shed isn't reporting
> this - or am I just not looking in the right place? It would make
> sense to show any installation issues under the "Tool Dependencies"
> entry on the main tool page.
> 
> Related to this, I'd like to suggest another couple of assertion action
> types, used for checking if directories or files exist, which would
> abort the installation with a clear error if the check fails:
> 
> <action type="assert_dir_exists">$INSTALL_DIR/module/</action>
> <action 
> type="assert_file_exists">$INSTALL_DIR/module/TTSS_STD-1.0.1.jar</action>
> 
> An obvious application of these would be immediately after an
> <action type="download_by_url"> line to sanity test the download
> (and decompression) worked as expected - and didn't for example
> just download an HTML error page for instance.
> 
> (In this case I am worried that perhaps the download_by_url
> action has been overly enthusiastic and unzipped the JAR file,
> perhaps based on the mime-type?).
> 
> Thanks,
> 
> Peter
> ___________________________________________________________
> Please keep all replies on the list by using "reply all"
> in your mail client.  To manage your subscriptions to this
> and other Galaxy lists, please use the interface at:
>   http://lists.bx.psu.edu/
> 
> To search Galaxy mailing lists use the unified search at:
>   http://galaxyproject.org/search/mailinglists/



___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/

Reply via email to