summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-05-29 23:23:33 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2016-08-08 21:04:23 -0700
commit37fc2583136f1abd5d39b15bb05d2102d182003a (patch)
tree371fefc8161f9bd79a9c5c4504a9e9365d1e8db6 /lib
parentfaa0a0e4c3a6e1bdfc68b97b3158c8cc14356e5d (diff)
downloadspack-37fc2583136f1abd5d39b15bb05d2102d182003a.tar.gz
spack-37fc2583136f1abd5d39b15bb05d2102d182003a.tar.bz2
spack-37fc2583136f1abd5d39b15bb05d2102d182003a.tar.xz
spack-37fc2583136f1abd5d39b15bb05d2102d182003a.zip
Remove vestigial methods from Package.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/package.py38
1 files changed, 0 insertions, 38 deletions
diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py
index c916bfaaa2..43aefbf65e 100644
--- a/lib/spack/spack/package.py
+++ b/lib/spack/spack/package.py
@@ -630,50 +630,12 @@ class Package(object):
exts = spack.install_layout.extension_map(self.extendee_spec)
return (self.name in exts) and (exts[self.name] == self.spec)
- def preorder_traversal(self, visited=None, **kwargs):
- """This does a preorder traversal of the package's dependence DAG."""
- virtual = kwargs.get("virtual", False)
-
- if visited is None:
- visited = set()
-
- if self.name in visited:
- return
- visited.add(self.name)
-
- if not virtual:
- yield self
-
- for name in sorted(self.dependencies.keys()):
- dep_spec = self.get_dependency(name)
- spec = dep_spec.spec
-
- # Currently, we do not descend into virtual dependencies, as this
- # makes doing a sensible traversal much harder. We just assume
- # that ANY of the virtual deps will work, which might not be true
- # (due to conflicts or unsatisfiable specs). For now this is ok,
- # but we might want to reinvestigate if we start using a lot of
- # complicated virtual dependencies
- # TODO: reinvestigate this.
- if spec.virtual:
- if virtual:
- yield spec
- continue
-
- for pkg in spack.repo.get(name).preorder_traversal(visited,
- **kwargs):
- yield pkg
-
def provides(self, vpkg_name):
"""
True if this package provides a virtual package with the specified name
"""
return any(s.name == vpkg_name for s in self.provided)
- def virtual_dependencies(self, visited=None):
- for spec in sorted(set(self.preorder_traversal(virtual=True))):
- yield spec
-
@property
def installed(self):
return os.path.isdir(self.prefix)