Allow the install action to only do download and configure and then exit
This commit is contained in:
@@ -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)),
|
||||
|
||||
Reference in New Issue
Block a user