Can't change working directory during tool dependency installation

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Can't change working directory during tool dependency installation

bgrande
I originally posted this question on the Galaxy Biostars, but later realized that galaxy-dev is probably more appropriate. So, here it goes. 

I'm trying to automate the installation of a tool's dependency with a tool dependency definition repository. During the package installation process, after moving the contents of a downloaded archive to the installation directory (i.e. $INSTALL_DIR), I simply want to change to that target directory away from the initial temporary working directory. 

However, I can't seem to change directory, either with a change_directory action or a cd shell_command action. Running pwd before and after attempting to change directory confirms this (see attached for installation log). I even made sure that $INSTALL_DIR is different from my initial working directory. 

Best regards, 
Bruno

___________________________________________________________
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/

installation_log.txt (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Can't change working directory during tool dependency installation

Ross-2
You might need to specify multiple command lines in a single shell action - separated by ; like: 
cd foo; perl foo bah; more something; cleanup
Otherwise you might just find yourself back in the temp installation directory after each separate action


Ross Lazarus
Head, Computational Biology, Baker IDI, Melbourne, Australia


On Sat, Oct 25, 2014 at 4:10 PM, Bruno Grande <[hidden email]> wrote:
I originally posted this question on the Galaxy Biostars, but later realized that galaxy-dev is probably more appropriate. So, here it goes. 

I'm trying to automate the installation of a tool's dependency with a tool dependency definition repository. During the package installation process, after moving the contents of a downloaded archive to the installation directory (i.e. $INSTALL_DIR), I simply want to change to that target directory away from the initial temporary working directory. 

However, I can't seem to change directory, either with a change_directory action or a cd shell_command action. Running pwd before and after attempting to change directory confirms this (see attached for installation log). I even made sure that $INSTALL_DIR is different from my initial working directory. 

Best regards, 
Bruno

___________________________________________________________
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 | Threaded
Open this post in threaded view
|

Re: Can't change working directory during tool dependency installation

bgrande
Stringing commands together in a single shell_command action seems to be a good workaround. Thanks! 

On the other hand, I wonder if this is the expected behaviour. Wouldn't it defeat the purpose of having a change_directory action, given that the current working directory changes back to the initial temporary directory as soon as the action is done? 

Best regards, 
Bruno


On Fri, Oct 24, 2014 at 11:52 PM, Ross <[hidden email]> wrote:
You might need to specify multiple command lines in a single shell action - separated by ; like: 
cd foo; perl foo bah; more something; cleanup
Otherwise you might just find yourself back in the temp installation directory after each separate action


Ross Lazarus
Head, Computational Biology, Baker IDI, Melbourne, Australia


On Sat, Oct 25, 2014 at 4:10 PM, Bruno Grande <[hidden email]> wrote:
I originally posted this question on the Galaxy Biostars, but later realized that galaxy-dev is probably more appropriate. So, here it goes. 

I'm trying to automate the installation of a tool's dependency with a tool dependency definition repository. During the package installation process, after moving the contents of a downloaded archive to the installation directory (i.e. $INSTALL_DIR), I simply want to change to that target directory away from the initial temporary working directory. 

However, I can't seem to change directory, either with a change_directory action or a cd shell_command action. Running pwd before and after attempting to change directory confirms this (see attached for installation log). I even made sure that $INSTALL_DIR is different from my initial working directory. 

Best regards, 
Bruno

___________________________________________________________
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/