Skip to content

Commit

Permalink
packaging: enable engine when it was enabled in answer file
Browse files Browse the repository at this point in the history
When using an answer file that contains:
QUESTION/1/OVESETUP_ENGINE_ENABLE=str:yes
The CoreEnv.ENABLE was not set to True if fqdn's didn't match and it was
not a new database.

But as we explicitly want to enable the engine according to the answer
file, we must enable it.

Signed-off-by: Jean-Louis Dupond <jean-louis@dupond.be>
  • Loading branch information
dupondje authored and sandrobonazzola committed Oct 24, 2024
1 parent 15bc8eb commit 58c74a4
Showing 1 changed file with 22 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,24 +64,36 @@ def _setup(self):
)
def _customization(self):
if self.environment[oenginecons.CoreEnv.ENABLE] is None:
self.environment[oenginecons.CoreEnv.ENABLE] = (
dialog.queryBoolean(
enabled = dialog.queryBoolean(
dialog=self.dialog,
name='OVESETUP_ENGINE_ENABLE',
note=_(
'Configure Engine on this host '
'(@VALUES@) [@DEFAULT@]: '
),
prompt=True,
default=True,
) if self.environment[oenginecons.EngineDBEnv.NEW_DATABASE]
else (
self._engine_fqdn is not None and
self.environment[
osetupcons.ConfigEnv.FQDN
] == self._engine_fqdn
)
)
if enabled is None:
self.environment[oenginecons.CoreEnv.ENABLE] = (
dialog.queryBoolean(
dialog=self.dialog,
name='OVESETUP_ENGINE_ENABLE',
note=_(
'Configure Engine on this host '
'(@VALUES@) [@DEFAULT@]: '
),
prompt=True,
default=True,
) if self.environment[oenginecons.EngineDBEnv.NEW_DATABASE]
else (
self._engine_fqdn is not None and
self.environment[
osetupcons.ConfigEnv.FQDN
] == self._engine_fqdn
)
)
else:
self.environment[oenginecons.CoreEnv.ENABLE] = enabled
if self.environment[oenginecons.CoreEnv.ENABLE]:
self.environment[oengcommcons.ApacheEnv.ENABLE] = True
self.environment[
Expand Down

0 comments on commit 58c74a4

Please sign in to comment.