Skip to content
Snippets Groups Projects
Commit 0e2b1359 authored by Massimiliano Culpo's avatar Massimiliano Culpo
Browse files

modules : fixed bug preventing the creation of modulefiles autoloading only direct dependencies

parent a5a5dbc4
No related branches found
No related tags found
No related merge requests found
...@@ -117,22 +117,20 @@ ...@@ -117,22 +117,20 @@
the site configuration will be ignored. the site configuration will be ignored.
""" """
import copy
import os import os
import re import re
import sys import sys
import copy
import jsonschema
from jsonschema import Draft4Validator, validators
import yaml
from yaml.error import MarkedYAMLError
from ordereddict_backport import OrderedDict
import jsonschema
import llnl.util.tty as tty import llnl.util.tty as tty
from llnl.util.filesystem import mkdirp
import copy
import spack import spack
import yaml
from jsonschema import Draft4Validator, validators
from llnl.util.filesystem import mkdirp
from ordereddict_backport import OrderedDict
from spack.error import SpackError from spack.error import SpackError
from yaml.error import MarkedYAMLError
# Hacked yaml for configuration files preserves line numbers. # Hacked yaml for configuration files preserves line numbers.
import spack.util.spack_yaml as syaml import spack.util.spack_yaml as syaml
......
...@@ -114,14 +114,14 @@ def inspect_path(prefix): ...@@ -114,14 +114,14 @@ def inspect_path(prefix):
return env return env
def dependencies(spec, request='All'): def dependencies(spec, request='all'):
if request == 'None': if request == 'none':
return [] return []
l = [xx for xx in l = [xx for xx in
sorted(spec.traverse(order='post', depth=True, cover='nodes', root=False), reverse=True)] sorted(spec.traverse(order='post', depth=True, cover='nodes', root=False), reverse=True)]
if request == 'Direct': if request == 'direct':
return [xx for ii, xx in l if ii == 1] return [xx for ii, xx in l if ii == 1]
# FIXME : during module file creation nodes seem to be visited multiple times even if cover='nodes' # FIXME : during module file creation nodes seem to be visited multiple times even if cover='nodes'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment