Skip to content

Commit

Permalink
Fix dependency ordering broken in #2917.
Browse files Browse the repository at this point in the history
We will store dependencies in an OrderedDict, matching the order of `<requirements>`.

Fixes an issue where an R library was being sourced before R itself during shell command generation, the sourcing of R afterwards overwrote the `R_LIBS` env setting.
  • Loading branch information
blankenberg committed Oct 11, 2016
1 parent 1156006 commit 2b9281a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/galaxy/tools/deps/__init__.py
Expand Up @@ -5,6 +5,8 @@
import logging
import os.path

from collections import OrderedDict

from galaxy.util import plugin_config

from .resolvers import NullDependency
Expand Down Expand Up @@ -97,7 +99,7 @@ def requirements_to_dependencies(self, requirements, **kwds):
Takes a list of requirements and returns a dictionary
with requirements as key and dependencies as value.
"""
requirement_to_dependency = dict()
requirement_to_dependency = OrderedDict()
for requirement in requirements:
if requirement.type in [ 'package', 'set_environment' ]:
dependency = self.find_dep( name=requirement.name,
Expand Down

0 comments on commit 2b9281a

Please sign in to comment.