Skip to content
Snippets Groups Projects
Commit 4f9e548b authored by Elizabeth Fischer's avatar Elizabeth Fischer Committed by becker33
Browse files

Update `spack setup` and `spack graph` to be consistent with recent refactoring (#2317)

* Update `spack setup` and `spack graph` to be consistent with c557e765 and 9347f869.  Fixes #2316.

* Added another "fix" necessary to make `spack setup` work.

* Added another "fix" necessary to make `spack setup` work. (reverted from commit 7f0d3ecb38c97ec00491d7cd66b4266e3018b1ca)
parent d8554035
Branches
Tags
No related merge requests found
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
import spack import spack
import spack.cmd import spack.cmd
import spack.store
from spack.spec import * from spack.spec import *
from spack.graph import * from spack.graph import *
...@@ -73,7 +74,7 @@ def graph(parser, args): ...@@ -73,7 +74,7 @@ def graph(parser, args):
if args.specs: if args.specs:
tty.die("Can't specify specs with --installed") tty.die("Can't specify specs with --installed")
args.dot = True args.dot = True
specs = spack.installed_db.query() specs = spack.store.db.query()
else: else:
specs = spack.cmd.parse_specs( specs = spack.cmd.parse_specs(
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
import llnl.util.tty as tty import llnl.util.tty as tty
import spack import spack
import spack.store
import spack.cmd import spack.cmd
import spack.cmd.install as install import spack.cmd.install as install
import spack.cmd.common.arguments as arguments import spack.cmd.common.arguments as arguments
...@@ -130,7 +131,7 @@ def setup(self, args): ...@@ -130,7 +131,7 @@ def setup(self, args):
tty.die("spack setup only takes one spec.") tty.die("spack setup only takes one spec.")
# Take a write lock before checking for existence. # Take a write lock before checking for existence.
with spack.installed_db.write_transaction(): with spack.store.db.write_transaction():
spec = specs[0] spec = specs[0]
if not spack.repo.exists(spec.name): if not spack.repo.exists(spec.name):
tty.warn("No such package: %s" % spec.name) tty.warn("No such package: %s" % spec.name)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment