summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/cmd/common/arguments.py8
-rw-r--r--lib/spack/spack/cmd/dev_build.py7
-rw-r--r--lib/spack/spack/cmd/fetch.py7
-rw-r--r--lib/spack/spack/cmd/install.py5
-rw-r--r--lib/spack/spack/cmd/mirror.py6
-rw-r--r--lib/spack/spack/cmd/patch.py5
-rw-r--r--lib/spack/spack/cmd/stage.py5
7 files changed, 16 insertions, 27 deletions
diff --git a/lib/spack/spack/cmd/common/arguments.py b/lib/spack/spack/cmd/common/arguments.py
index 12f9e5b0d7..ab9f893980 100644
--- a/lib/spack/spack/cmd/common/arguments.py
+++ b/lib/spack/spack/cmd/common/arguments.py
@@ -570,6 +570,14 @@ def add_concretizer_args(subparser):
default=None,
help="reuse installed dependencies only",
)
+ subgroup.add_argument(
+ "--deprecated",
+ action=ConfigSetAction,
+ dest="config:deprecated",
+ const=True,
+ default=None,
+ help="allow concretizer to select deprecated versions",
+ )
def add_connection_args(subparser, add_help):
diff --git a/lib/spack/spack/cmd/dev_build.py b/lib/spack/spack/cmd/dev_build.py
index fbd8a78f09..0a8dc49309 100644
--- a/lib/spack/spack/cmd/dev_build.py
+++ b/lib/spack/spack/cmd/dev_build.py
@@ -19,7 +19,7 @@ level = "long"
def setup_parser(subparser):
- arguments.add_common_arguments(subparser, ["jobs"])
+ arguments.add_common_arguments(subparser, ["jobs", "no_checksum", "spec"])
subparser.add_argument(
"-d",
"--source-path",
@@ -34,7 +34,6 @@ def setup_parser(subparser):
dest="ignore_deps",
help="do not try to install dependencies of requested packages",
)
- arguments.add_common_arguments(subparser, ["no_checksum", "deprecated"])
subparser.add_argument(
"--keep-prefix",
action="store_true",
@@ -63,7 +62,6 @@ def setup_parser(subparser):
choices=["root", "all"],
help="run tests on only root packages or all packages",
)
- arguments.add_common_arguments(subparser, ["spec"])
stop_group = subparser.add_mutually_exclusive_group()
stop_group.add_argument(
@@ -125,9 +123,6 @@ def dev_build(self, args):
if args.no_checksum:
spack.config.set("config:checksum", False, scope="command_line")
- if args.deprecated:
- spack.config.set("config:deprecated", True, scope="command_line")
-
tests = False
if args.test == "all":
tests = True
diff --git a/lib/spack/spack/cmd/fetch.py b/lib/spack/spack/cmd/fetch.py
index 383c722ad6..0d794eb547 100644
--- a/lib/spack/spack/cmd/fetch.py
+++ b/lib/spack/spack/cmd/fetch.py
@@ -18,7 +18,7 @@ level = "long"
def setup_parser(subparser):
- arguments.add_common_arguments(subparser, ["no_checksum", "deprecated"])
+ arguments.add_common_arguments(subparser, ["no_checksum", "specs"])
subparser.add_argument(
"-m",
"--missing",
@@ -28,7 +28,7 @@ def setup_parser(subparser):
subparser.add_argument(
"-D", "--dependencies", action="store_true", help="also fetch all dependencies"
)
- arguments.add_common_arguments(subparser, ["specs"])
+ arguments.add_concretizer_args(subparser)
subparser.epilog = (
"With an active environment, the specs "
"parameter can be omitted. In this case all (uninstalled"
@@ -40,9 +40,6 @@ def fetch(parser, args):
if args.no_checksum:
spack.config.set("config:checksum", False, scope="command_line")
- if args.deprecated:
- spack.config.set("config:deprecated", True, scope="command_line")
-
if args.specs:
specs = spack.cmd.parse_specs(args.specs, concretize=True)
else:
diff --git a/lib/spack/spack/cmd/install.py b/lib/spack/spack/cmd/install.py
index 9c66c661a0..aa958a682c 100644
--- a/lib/spack/spack/cmd/install.py
+++ b/lib/spack/spack/cmd/install.py
@@ -176,7 +176,7 @@ def setup_parser(subparser):
dest="install_source",
help="install source files in prefix",
)
- arguments.add_common_arguments(subparser, ["no_checksum", "deprecated"])
+ arguments.add_common_arguments(subparser, ["no_checksum"])
subparser.add_argument(
"-v",
"--verbose",
@@ -326,9 +326,6 @@ def install(parser, args):
if args.no_checksum:
spack.config.set("config:checksum", False, scope="command_line")
- if args.deprecated:
- spack.config.set("config:deprecated", True, scope="command_line")
-
if args.log_file and not args.log_format:
msg = "the '--log-format' must be specified when using '--log-file'"
tty.die(msg)
diff --git a/lib/spack/spack/cmd/mirror.py b/lib/spack/spack/cmd/mirror.py
index fe9cafd545..0faf3123c7 100644
--- a/lib/spack/spack/cmd/mirror.py
+++ b/lib/spack/spack/cmd/mirror.py
@@ -28,7 +28,7 @@ level = "long"
def setup_parser(subparser):
- arguments.add_common_arguments(subparser, ["no_checksum", "deprecated"])
+ arguments.add_common_arguments(subparser, ["no_checksum"])
sp = subparser.add_subparsers(metavar="SUBCOMMAND", dest="mirror_command")
@@ -72,6 +72,7 @@ def setup_parser(subparser):
" retrieve all versions of each package",
)
arguments.add_common_arguments(create_parser, ["specs"])
+ arguments.add_concretizer_args(create_parser)
# Destroy
destroy_parser = sp.add_parser("destroy", help=mirror_destroy.__doc__)
@@ -549,7 +550,4 @@ def mirror(parser, args):
if args.no_checksum:
spack.config.set("config:checksum", False, scope="command_line")
- if args.deprecated:
- spack.config.set("config:deprecated", True, scope="command_line")
-
action[args.mirror_command](args)
diff --git a/lib/spack/spack/cmd/patch.py b/lib/spack/spack/cmd/patch.py
index e9aac661a2..b5805afd80 100644
--- a/lib/spack/spack/cmd/patch.py
+++ b/lib/spack/spack/cmd/patch.py
@@ -19,7 +19,7 @@ level = "long"
def setup_parser(subparser):
- arguments.add_common_arguments(subparser, ["no_checksum", "deprecated", "specs"])
+ arguments.add_common_arguments(subparser, ["no_checksum", "specs"])
arguments.add_concretizer_args(subparser)
@@ -33,9 +33,6 @@ def patch(parser, args):
if args.no_checksum:
spack.config.set("config:checksum", False, scope="command_line")
- if args.deprecated:
- spack.config.set("config:deprecated", True, scope="command_line")
-
specs = spack.cmd.parse_specs(args.specs, concretize=False)
for spec in specs:
_patch(spack.cmd.matching_spec_from_env(spec).package)
diff --git a/lib/spack/spack/cmd/stage.py b/lib/spack/spack/cmd/stage.py
index 8e74bcafca..10a94e3410 100644
--- a/lib/spack/spack/cmd/stage.py
+++ b/lib/spack/spack/cmd/stage.py
@@ -22,7 +22,7 @@ level = "long"
def setup_parser(subparser):
- arguments.add_common_arguments(subparser, ["no_checksum", "deprecated", "specs"])
+ arguments.add_common_arguments(subparser, ["no_checksum", "specs"])
subparser.add_argument(
"-p", "--path", dest="path", help="path to stage package, does not add to spack tree"
)
@@ -33,9 +33,6 @@ def stage(parser, args):
if args.no_checksum:
spack.config.set("config:checksum", False, scope="command_line")
- if args.deprecated:
- spack.config.set("config:deprecated", True, scope="command_line")
-
if not args.specs:
env = ev.active_environment()
if not env: