Hi,
I have been testing tools not yet ready for a tool-shed but had trouble finding the dependencies as there was no database entries to load these.

The code in lib/galaxy/tools/deps/resolvers/galaxy_packages.py assumes that the env.sh or bin directory will be in dependency_dir/package/version when in fact it is often in dependency_dir/
package/version/owner/package_name/revision.


I have created a pull request with some code to find the dependency in the sub directory

https://github.com/galaxyproject/galaxy/pull/413

As I am relatively new to galaxy I have probably broken lots of rules/agreements on how I did the pull request. If so please let me know where I went wrong so I can redo it properly.

Christian

PS.
This is my proposed change to lib/galaxy/tools/deps/resolvers/galaxy_packages.py:
    def _find_dep_versioned( self, name, version, type='package', **kwds ):
        #First try the way without owner/name/revision
        path = join( self.base_path, name, version )
        package = self._galaxy_package_dep(path, version)
        if package != INDETERMINATE_DEPENDENCY:
            return package
        #now try with an owner/name/revision
        for owner in listdir(path):
            owner_path = path + "/" + owner
            for package_name in listdir(owner_path):
                if package_name.startswith("package_"+name):
                    package_path = owner_path + "/" + package_name
                    for revision in listdir(package_path):
                        revision_path = package_path + "/" + revision
                        package = self._galaxy_package_dep(revision_path, version)
                        if package != INDETERMINATE_DEPENDENCY:
                            return package
        return INDETERMINATE_DEPENDENCY