From 950338aa92545aedde357e15929be672c113afb7 Mon Sep 17 00:00:00 2001 From: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com> Date: Thu, 26 Sep 2019 10:23:59 -0700 Subject: [PATCH] add --no-deps opt to `buildcache-create` (#12956) --- lib/spack/spack/cmd/buildcache.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/spack/spack/cmd/buildcache.py b/lib/spack/spack/cmd/buildcache.py index 5d5e693319..5f26fb8ef9 100644 --- a/lib/spack/spack/cmd/buildcache.py +++ b/lib/spack/spack/cmd/buildcache.py @@ -61,6 +61,8 @@ def setup_parser(subparser): create.add_argument( 'packages', nargs=argparse.REMAINDER, help="specs of packages to create buildcache for") + create.add_argument('--no-deps', action='store_true', default='false', + help='Create buildcache entry wo/ dependencies') create.set_defaults(func=createtarball) install = subparsers.add_parser('install', help=installtarball.__doc__) @@ -333,6 +335,8 @@ def createtarball(args): else: tty.debug('adding matching spec %s' % match.format()) specs.add(match) + if args.no_deps is True: + continue tty.debug('recursing dependencies') for d, node in match.traverse(order='post', depth=True,