Allow the install action to only do download and configure and then exit

This commit is contained in:
Joshua Harlow
2012-09-25 11:21:38 -07:00
parent 249d4f1355
commit 9a27bc568d
2 changed files with 22 additions and 0 deletions

View File

@@ -28,6 +28,10 @@ LOG = log.getLogger(__name__)
class InstallAction(action.Action):
def __init__(self, name, distro, root_dir, cli_opts):
action.Action.__init__(self, name, distro, root_dir, cli_opts)
self.only_configure = cli_opts.get('only_configure')
@property
def lookup_name(self):
return 'install'
@@ -73,6 +77,14 @@ class InstallAction(action.Action):
"configure",
'unconfigure'
)
if self.only_configure:
# TODO(harlowja) this could really be a new action that
# does the download and configure and let the install
# routing actually do the install steps
LOG.info("Exiting early, only asked to download and configure!")
return
self._run_phase(
PhaseFunctors(
start=lambda i: LOG.info('Preinstalling %s.', colorizer.quote(i.name)),