summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/spack/cmd/activate.py2
-rw-r--r--lib/spack/spack/cmd/deactivate.py8
-rw-r--r--lib/spack/spack/hooks/extensions.py2
-rw-r--r--lib/spack/spack/package.py8
4 files changed, 10 insertions, 10 deletions
diff --git a/lib/spack/spack/cmd/activate.py b/lib/spack/spack/cmd/activate.py
index d30485ab82..ae72ec7db2 100644
--- a/lib/spack/spack/cmd/activate.py
+++ b/lib/spack/spack/cmd/activate.py
@@ -50,7 +50,7 @@ def activate(parser, args):
if not spec.package.is_extension:
tty.die("%s is not an extension." % spec.name)
- if spec.package.activated:
+ if spec.package.is_activated():
tty.die("Package %s is already activated." % specs[0].short_spec)
spec.package.do_activate()
diff --git a/lib/spack/spack/cmd/deactivate.py b/lib/spack/spack/cmd/deactivate.py
index db0d717120..d09c276085 100644
--- a/lib/spack/spack/cmd/deactivate.py
+++ b/lib/spack/spack/cmd/deactivate.py
@@ -63,11 +63,11 @@ def deactivate(parser, args):
for ext_pkg in ext_pkgs:
ext_pkg.spec.normalize()
- if ext_pkg.activated:
+ if ext_pkg.is_activated():
ext_pkg.do_deactivate(force=True)
elif pkg.is_extension:
- if not args.force and not spec.package.activated:
+ if not args.force and not spec.package.is_activated():
tty.die("%s is not activated." % pkg.spec.short_spec)
tty.msg("Deactivating %s and all dependencies." %
@@ -80,7 +80,7 @@ def deactivate(parser, args):
espec = index[name]
epkg = espec.package
if epkg.extends(pkg.extendee_spec):
- if epkg.activated or args.force:
+ if epkg.is_activated() or args.force:
epkg.do_deactivate(force=args.force)
@@ -94,7 +94,7 @@ def deactivate(parser, args):
tty.die("spack deactivate requires an extension.",
"Did you mean 'spack deactivate --all'?")
- if not args.force and not spec.package.activated:
+ if not args.force and not spec.package.is_activated():
tty.die("Package %s is not activated." % specs[0].short_spec)
spec.package.do_deactivate(force=args.force)
diff --git a/lib/spack/spack/hooks/extensions.py b/lib/spack/spack/hooks/extensions.py
index 56c0f35376..03a62e2bd0 100644
--- a/lib/spack/spack/hooks/extensions.py
+++ b/lib/spack/spack/hooks/extensions.py
@@ -29,5 +29,5 @@ def pre_uninstall(spec):
assert spec.concrete
if pkg.is_extension:
- if pkg.activated:
+ if pkg.is_activated():
pkg.do_deactivate(force=True)
diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py
index 2081046a0d..fb82aa201c 100644
--- a/lib/spack/spack/package.py
+++ b/lib/spack/spack/package.py
@@ -903,8 +903,8 @@ class PackageBase(with_metaclass(PackageMeta, object)):
s = self.extendee_spec
return s and spec.satisfies(s)
- @property
- def activated(self):
+ def is_activated(self):
+ """Return True if package is activated."""
if not self.is_extension:
raise ValueError(
"is_extension called on package that is not an extension.")
@@ -1787,7 +1787,7 @@ class PackageBase(with_metaclass(PackageMeta, object)):
# Activate any package dependencies that are also extensions.
if not force:
for spec in self.dependency_activations():
- if not spec.package.activated:
+ if not spec.package.is_activated():
spec.package.do_activate(force=force)
self.extendee_spec.package.activate(self, **self.extendee_args)
@@ -1849,7 +1849,7 @@ class PackageBase(with_metaclass(PackageMeta, object)):
# redundant activation check -- makes SURE the spec is not
# still activated even if something was wrong above.
- if self.activated:
+ if self.is_activated():
spack.store.layout.remove_extension(
self.extendee_spec, self.spec)