summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2020-10-05 19:20:04 +0200
committerJürg Billeter <j@bitron.ch>2020-10-27 08:12:46 +0100
commitf034b652074a59991c261192bda35697ba28b5c6 (patch)
tree9d241be4f27e5ec940fb50230efb3756a84c452b
parentdda4690b5a604d25ce85e5ff963313498771e57a (diff)
downloadbuildstream-f034b652074a59991c261192bda35697ba28b5c6.tar.gz
_frontend/cli.py: Drop support for bst shell --use-buildtree=ask
-rw-r--r--src/buildstream/_frontend/cli.py29
1 files changed, 2 insertions, 27 deletions
diff --git a/src/buildstream/_frontend/cli.py b/src/buildstream/_frontend/cli.py
index 946024bb7..9b8150cca 100644
--- a/src/buildstream/_frontend/cli.py
+++ b/src/buildstream/_frontend/cli.py
@@ -578,8 +578,8 @@ def show(app, elements, deps, except_, order, format_):
"--use-buildtree",
"-t",
"cli_buildtree",
- type=click.Choice(["ask", "try", "always", "never"]),
- default="ask",
+ type=click.Choice(["try", "always", "never"]),
+ default="never",
show_default=True,
help=(
"Stage a buildtree. If `always` is set, will always fail to "
@@ -687,31 +687,6 @@ def shell(app, element, mount, isolate, build_, cli_buildtree, pull_, command):
"Artifact not cached locally. Can be retried with --pull and pull-buildtrees configured"
)
click.echo("WARNING: buildtree is not cached locally, shell will be loaded without it", err=True)
- else:
- # If the value has defaulted to ask and in non interactive mode, don't consider the buildtree, this
- # being the default behaviour of the command
- if app.interactive and cli_buildtree == "ask":
- if buildtree_is_cached and bool(click.confirm("Do you want to use the cached buildtree?")):
- use_buildtree = "always"
- elif can_attempt_pull:
- # If buildtree not cached, check if it's worth presenting the user a dialogue
- message = None
- if artifact_is_cached:
- if buildtree_exists:
- message = "Buildtree not cached but can be pulled if in available remotes, do you want to use it?"
- else:
- message = "Element is not cached so buildtree status unknown, do you want to pull and use it?"
- if message:
- try:
- choice = click.prompt(
- message, type=click.Choice(["try", "always", "never"]), err=True, show_choices=True,
- )
- except click.Abort:
- click.echo("Aborting", err=True)
- sys.exit(-1)
-
- if choice != "never":
- use_buildtree = choice
# Raise warning if the element is cached in a failed state
if use_buildtree and element._cached_failure():