summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarmen Stoppels <me@harmenstoppels.nl>2023-10-31 16:52:53 +0100
committerGitHub <noreply@github.com>2023-10-31 16:52:53 +0100
commitcd6bb9e159ea18c46f399958558dfeb39bfb04a0 (patch)
tree777ffa1cc1e9429fd579b0d3cb226cfa56afb75f
parente420a685a9749216deeb48db96d62d7bd76bfab3 (diff)
downloadspack-cd6bb9e159ea18c46f399958558dfeb39bfb04a0.tar.gz
spack-cd6bb9e159ea18c46f399958558dfeb39bfb04a0.tar.bz2
spack-cd6bb9e159ea18c46f399958558dfeb39bfb04a0.tar.xz
spack-cd6bb9e159ea18c46f399958558dfeb39bfb04a0.zip
spack checksum: improve signature (#40800)
-rw-r--r--lib/spack/spack/cmd/checksum.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/spack/spack/cmd/checksum.py b/lib/spack/spack/cmd/checksum.py
index 9e5e32b3b7..f927d2d922 100644
--- a/lib/spack/spack/cmd/checksum.py
+++ b/lib/spack/spack/cmd/checksum.py
@@ -3,7 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import argparse
import re
import sys
@@ -67,11 +66,18 @@ def setup_parser(subparser):
modes_parser.add_argument(
"--verify", action="store_true", default=False, help="verify known package checksums"
)
- subparser.add_argument("package", help="package or spec. for example cmake or cmake@3.18")
+ subparser.add_argument("package", help="name or spec (e.g. `cmake` or `cmake@3.18`)")
subparser.add_argument(
- "versions", nargs=argparse.REMAINDER, help="versions to generate checksums for"
+ "versions",
+ nargs="*",
+ help="checksum these specific versions (if omitted, Spack searches for remote versions)",
)
arguments.add_common_arguments(subparser, ["jobs"])
+ subparser.epilog = (
+ "examples:\n"
+ " `spack checksum zlib@1.2` autodetects versions 1.2.0 to 1.2.13 from the remote\n"
+ " `spack checksum zlib 1.2.13` checksums exact version 1.2.13 directly without search\n"
+ )
def checksum(parser, args):