diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-10-07 20:50:52 +0900 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2017-11-02 11:48:42 +0000 |
commit | e684648ceff968e20f39f54a771e7f864c537ac9 (patch) | |
tree | 4d9de6302cabdf4340bc54a98542e5ede99de36e | |
parent | cef0359292b8843f3ab060c6b2fbc6c7890747f5 (diff) | |
download | buildstream-e684648ceff968e20f39f54a771e7f864c537ac9.tar.gz |
_frontend/main.py: Removing arch related options
And adding --integrate/--no-integrate option to `bst checkout`
-rw-r--r-- | buildstream/_frontend/main.py | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/buildstream/_frontend/main.py b/buildstream/_frontend/main.py index 073bb8c3e..245dda943 100644 --- a/buildstream/_frontend/main.py +++ b/buildstream/_frontend/main.py @@ -41,7 +41,6 @@ from .complete import main_bashcomplete, complete_path, CompleteUnhandled # Some globals resolved for default arguments in the cli build_stream_version = pkg_resources.require("buildstream")[0].version -_, _, _, _, host_machine = os.uname() ################################################################## @@ -167,12 +166,6 @@ click.BaseCommand.main = override_main help="A file to store the main log (allows storing the main log while in interactive mode)") @click.option('--colors/--no-colors', default=None, help="Force enable/disable ANSI color codes in output") -@click.option('--arch', '-a', default=host_machine, - help="Machine architecture (default: %s)" % host_machine) -@click.option('--host-arch', - help="Machine architecture for the sandbox (defaults to --arch)") -@click.option('--target-arch', - help="Machine architecture for build output (defaults to --arch)") @click.option('--strict/--no-strict', default=None, is_flag=True, help="Elements must be rebuilt when their dependencies have changed") @click.option('--option', '-o', type=click.Tuple([str, str]), multiple=True, @@ -507,16 +500,18 @@ def shell(app, target, sysroot, build, command): @cli.command(short_help="Checkout a built artifact") @click.option('--force', '-f', default=False, is_flag=True, help="Overwrite files existing in checkout directory") +@click.option('--integrate/--no-integrate', default=True, is_flag=True, + help="Whether to run integration commands") @click.argument('target', type=click.Path(dir_okay=False, readable=True)) @click.argument('directory', type=click.Path(file_okay=False)) @click.pass_obj -def checkout(app, target, directory, force): +def checkout(app, target, directory, force, integrate): """Checkout a built artifact to the specified directory """ app.initialize(target) try: - app.pipeline.checkout(directory, force) + app.pipeline.checkout(directory, force, integrate) click.echo("") except _BstError as e: click.echo("") @@ -667,7 +662,7 @@ def workspace_list(app): config = app.main_options['config'] try: - context = Context(app.main_options['option'], app.host_arch, app.target_arch) + context = Context(app.main_options['option']) context.load(config) except _BstError as e: click.echo("Error loading user configuration: {}".format(e)) @@ -708,8 +703,6 @@ class App(): self.logger = None self.status = None self.target = None - self.host_arch = main_options['host_arch'] or main_options['arch'] - self.target_arch = main_options['target_arch'] or main_options['arch'] # Main asset handles self.context = None @@ -764,14 +757,13 @@ class App(): def initialize(self, target, rewritable=False, inconsistent=False, fetch_remote_refs=False): self.target = target - profile_start(Topics.LOAD_PIPELINE, target.replace(os.sep, '-') + '-' + - self.host_arch + '-' + self.target_arch) + profile_start(Topics.LOAD_PIPELINE, target.replace(os.sep, '-')) directory = self.main_options['directory'] config = self.main_options['config'] try: - self.context = Context(self.main_options['option'], self.host_arch, self.target_arch) + self.context = Context(self.main_options['option']) self.context.load(config) except _BstError as e: click.echo("Error loading user configuration: %s" % str(e)) @@ -858,7 +850,7 @@ class App(): self.logger.size_request(self.pipeline) self.messaging_enabled = True - profile_end(Topics.LOAD_PIPELINE, target.replace(os.sep, '-') + '-' + self.host_arch + '-' + self.target_arch) + profile_end(Topics.LOAD_PIPELINE, target.replace(os.sep, '-')) # # Render the status area, conditional on some internal state |