Fix for defining set_environment_for_install tags in multiple tag sets instead of multiple repositories per tag set.

This commit is contained in:
Greg Von Kuster
2013-05-21 16:46:16 -04:00
parent 684420511f
commit 4bb901eca0
2 changed files with 9 additions and 2 deletions
@@ -131,7 +131,14 @@ def get_env_shell_file_paths( app, elem ):
tool_dependency_key = '%s/%s' % ( tool_dependency_name, tool_dependency_version )
installation_directory = tool_dependency.installation_directory( app )
env_shell_file_path = get_env_shell_file_path( installation_directory )
env_shell_file_paths.append( env_shell_file_path )
if env_shell_file_path:
env_shell_file_paths.append( env_shell_file_path )
else:
error_message = "Skipping tool dependency definition because unable to locate env.sh file for tool dependency "
error_message += "type %s, name %s, version %s for repository %s" % \
( str( tool_dependency_type ), str( tool_dependency_name ), str( tool_dependency_version ), str( repository.name ) )
log.debug( error_message )
continue
else:
error_message = "Skipping tool dependency definition because unable to locate tool dependency "
error_message += "type %s, name %s, version %s for repository %s" % \
@@ -346,6 +346,7 @@ def install_via_fabric( app, tool_dependency, actions_elem, install_dir, package
if package_name:
actions_dict[ 'package_name' ] = package_name
actions = []
all_env_shell_file_paths = []
for action_elem in actions_elem:
action_dict = {}
action_type = action_elem.get( 'type', 'shell_command' )
@@ -415,7 +416,6 @@ def install_via_fabric( app, tool_dependency, actions_elem, install_dir, package
# that above are supported, but in the future other approaches to setting environment variables or other environment attributes can be
# supported. The above tag set will result in the installed and compiled numpy version 1.7.1 binary to be used when compiling the current
# tool dependency package. See the package_matplotlib_1_2 repository in the test tool shed for a real-world example.
all_env_shell_file_paths = []
for env_elem in action_elem:
if env_elem.tag == 'repository':
env_shell_file_paths = common_util.get_env_shell_file_paths( app, env_elem )