add --no-deps opt to buildcache-create (#12956)

This commit is contained in:
eugeneswalker 2019-09-26 10:23:59 -07:00 committed by Patrick Gartung
parent 321e956fa9
commit 950338aa92

View file

@ -61,6 +61,8 @@ def setup_parser(subparser):
create.add_argument( create.add_argument(
'packages', nargs=argparse.REMAINDER, 'packages', nargs=argparse.REMAINDER,
help="specs of packages to create buildcache for") 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) create.set_defaults(func=createtarball)
install = subparsers.add_parser('install', help=installtarball.__doc__) install = subparsers.add_parser('install', help=installtarball.__doc__)
@ -333,6 +335,8 @@ def createtarball(args):
else: else:
tty.debug('adding matching spec %s' % match.format()) tty.debug('adding matching spec %s' % match.format())
specs.add(match) specs.add(match)
if args.no_deps is True:
continue
tty.debug('recursing dependencies') tty.debug('recursing dependencies')
for d, node in match.traverse(order='post', for d, node in match.traverse(order='post',
depth=True, depth=True,