From ae13dbb318be7a6df1d5e11155996c72a4147706 Mon Sep 17 00:00:00 2001 From: Tiago Gomes Date: Mon, 30 Nov 2015 11:34:27 +0000 Subject: Remove (dist)?build-morphology commands Change-Id: Ifb2bc2e2084806fe70b6db96828a390d3082288f --- morphlib/plugins/build_plugin.py | 79 ---------------------------------------- 1 file changed, 79 deletions(-) diff --git a/morphlib/plugins/build_plugin.py b/morphlib/plugins/build_plugin.py index 0da5d7cf..0aab2d51 100644 --- a/morphlib/plugins/build_plugin.py +++ b/morphlib/plugins/build_plugin.py @@ -33,15 +33,8 @@ class ComponentNotInSystemError(morphlib.Error): class BuildPlugin(cliapp.Plugin): def enable(self): - self.app.add_subcommand('build-morphology', self.build_morphology, - arg_synopsis='REPO REF FILENAME ' - '[COMPONENT...]') self.app.add_subcommand('build', self.build, arg_synopsis='SYSTEM [COMPONENT...]') - self.app.add_subcommand('distbuild-morphology', - self.distbuild_morphology, - arg_synopsis='REPO REF FILENAME ' - '[COMPONENT...]') self.app.add_subcommand('distbuild', self.distbuild, arg_synopsis='SYSTEM [COMPONENT...]') self.app.add_subcommand('distbuild-start', self.distbuild_start, @@ -54,31 +47,6 @@ class BuildPlugin(cliapp.Plugin): def _cmd_usage(self, cmd): return 'usage: morph %s %s' % (cmd, self.app.cmd_synopsis[cmd]) - def distbuild_morphology(self, args): - '''Distbuild a system without having to clone a definitions repo. - - Command line arguments: - - * `REPO` is a git repository URL. - * `REF` is a branch or other commit reference in that repository. - * `FILENAME` is a morphology filename at that ref. - * `COMPONENT...` is the names of one or more chunks or strata to - build. If none are given the the system at FILENAME is built. - - See 'help distbuild' and 'help build-morphology' for more information. - - ''' - MINARGS = 3 - - if len(args) < MINARGS: - raise cliapp.AppException(self._cmd_usage('distbuild-morphology')) - - repo, ref, filename = args[0:MINARGS] - filename = morphlib.util.sanitise_morphology_path(filename) - component_names = args[MINARGS:] - - self._distbuild(repo, ref, filename, component_names=component_names) - def distbuild(self, args): '''Distbuild a system image in the current definitions repo @@ -179,53 +147,6 @@ class BuildPlugin(cliapp.Plugin): repo_url, commit, filename, original_ref=original_ref, component_names=component_names) - def build_morphology(self, args): - '''Build a system without having to clone a definitions repo. - - Command line arguments: - - * `REPO` is a git repository URL. - * `REF` is a branch or other commit reference in that repository. - * `FILENAME` is a morphology filename at that ref. - * `COMPONENT...` is the names of one or more chunks or strata to - build. If none are given then the system at FILENAME is built. - - This subcommand does not automatically commit changes to a - temporary branch, so you can only build from properly committed - sources that have been pushed to the git server. - - Example: - - morph build-morphology baserock:baserock/definitions \\ - master systems/devel-system-x86_64-generic.morph - - Partial build example: - - morph build-morphology baserock:baserock/definitions \\ - master systems/devel-system-x86_64-generic.morph \\ - build-essential - - ''' - MINARGS = 3 - - if len(args) < MINARGS: - raise cliapp.AppException(self._cmd_usage('build-morphology')) - - repo, ref, filename = args[0:MINARGS] - filename = morphlib.util.sanitise_morphology_path(filename) - component_names = args[MINARGS:] - - # Raise an exception if there is not enough space - morphlib.util.check_disk_available( - self.app.settings['tempdir'], - self.app.settings['tempdir-min-space'], - self.app.settings['cachedir'], - self.app.settings['cachedir-min-space']) - - build_command = morphlib.buildcommand.BuildCommand(self.app) - srcpool = build_command.create_source_pool(repo, ref, [filename]) - self._build(srcpool, filename, component_names=component_names) - def build(self, args): '''Build a system image in the current definitions repo. -- cgit v1.2.1