summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPaul Hopkins <paul.hopkins@ligo.org>2016-07-18 12:51:58 +0100
committerPaul Hopkins <paul.hopkins@ligo.org>2016-07-18 12:51:58 +0100
commit2b3ba850b31af879312bc1e7c8400c2725a5c038 (patch)
treeb694a884782000cf27fa8a58c5873316bccc2ace /lib
parentb3789a469317ccb0fbbe73d6ab1f883be41a35ab (diff)
downloadspack-2b3ba850b31af879312bc1e7c8400c2725a5c038.tar.gz
spack-2b3ba850b31af879312bc1e7c8400c2725a5c038.tar.bz2
spack-2b3ba850b31af879312bc1e7c8400c2725a5c038.tar.xz
spack-2b3ba850b31af879312bc1e7c8400c2725a5c038.zip
Fix spack package-list to correctly handle deptypes
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/cmd/package-list.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/spack/spack/cmd/package-list.py b/lib/spack/spack/cmd/package-list.py
index bc64c77eab..ffb656c468 100644
--- a/lib/spack/spack/cmd/package-list.py
+++ b/lib/spack/spack/cmd/package-list.py
@@ -48,7 +48,8 @@ def rst_table(elts):
def print_rst_package_list():
"""Print out information on all packages in restructured text."""
- pkgs = sorted(spack.repo.all_packages(), key=lambda s:s.name.lower())
+ pkgs = sorted(spack.repo.all_packages(), key=lambda s: s.name.lower())
+ pkg_names = [p.name for p in pkgs]
print ".. _package-list:"
print
@@ -62,7 +63,7 @@ def print_rst_package_list():
print "Spack currently has %d mainline packages:" % len(pkgs)
print
- print rst_table("`%s`_" % p.name for p in pkgs)
+ print rst_table("`%s`_" % p for p in pkg_names)
print
print "-----"
@@ -79,14 +80,15 @@ def print_rst_package_list():
print
if pkg.versions:
print "Versions:"
- print " " + ", ".join(str(v) for v in reversed(sorted(pkg.versions)))
+ print " " + ", ".join(str(v) for v in
+ reversed(sorted(pkg.versions)))
- for deptype in ('build', 'link', 'run'):
- deps = pkg.dependencies(deptype)
+ for deptype in spack.alldeps:
+ deps = pkg.dependencies_of_type(deptype)
if deps:
print "%s Dependencies" % deptype.capitalize()
- print " " + ", ".join("`%s`_" % d if d != "mpi" else d
- for d in build_deps)
+ print " " + ", ".join("%s_" % d if d in pkg_names
+ else d for d in deps)
print
print "Description:"