[FIX] install: --with_extra sans effet sur un env déjà installé (CybroOdoo)
« Installation avec modules extra » (--with_extra) ne clonait pas CybroOdoo sur un env déjà installé : validate_environment renvoyait « valide » -> update_environment (où l'état extra est posé via set_version_installed) était sauté -> get_version_extra restait False -> git_merge_repo_manifest n'ajoutait pas manifest/git_manifest_extra_odooXX.xml -> CybroOdoo jamais synchronisé ni ajouté à config.conf (« Nothing to do »). Nouvelle étape apply_extra_modules(), appelée dans main() quand --with_extra est demandé (même si l'env de base est déjà installé) : pose l'état extra, régénère le manifest local + repo sync (clone CybroOdoo). La post-étape qui suit régénère config.conf, qui prend alors le nouveau chemin d'addons. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
5951b0374f
commit
71aba63b03
1 changed files with 31 additions and 0 deletions
|
|
@ -524,6 +524,28 @@ class Update:
|
|||
status = os.system("./script/install/install_locally_dev.sh")
|
||||
return status
|
||||
|
||||
def apply_extra_modules(self):
|
||||
"""Add the extra modules (CybroOdoo) to the repo manifest, EVEN when
|
||||
the base environment is already installed. Records the extra state so
|
||||
git_merge_repo_manifest includes manifest/git_manifest_extra_odooXX.xml,
|
||||
then re-generates the local manifest and re-syncs the repos (the Odoo
|
||||
config is regenerated by the post-install step that follows).
|
||||
|
||||
Without this, « --with_extra » on an already-installed env was a no-op:
|
||||
update_environment() (where the extra state is set) is skipped when the
|
||||
env is valid, so get_version_extra() stayed False and CybroOdoo was
|
||||
never cloned nor added to config.conf. Returns the os.system status."""
|
||||
_logger.info("Applying extra modules (CybroOdoo) to the manifest...")
|
||||
if _STATE_AVAILABLE:
|
||||
set_version_installed(
|
||||
self.new_version_odoo,
|
||||
extra=True,
|
||||
python=self.new_version_python,
|
||||
poetry=self.new_version_poetry,
|
||||
)
|
||||
self.execute_log.append("Extra modules (CybroOdoo)")
|
||||
return os.system("./script/manifest/update_manifest_local_dev.sh")
|
||||
|
||||
def install_system(self):
|
||||
self.execute_log.append(f"System installation")
|
||||
status = os.system("./script/install/install_dev.sh")
|
||||
|
|
@ -736,6 +758,15 @@ def main():
|
|||
exit_code = 1
|
||||
update.print_log()
|
||||
|
||||
# --with_extra : appliquer les modules extra (CybroOdoo) MÊME si l'env de
|
||||
# base est déjà installé (sinon update_environment est sauté -> « Nothing
|
||||
# to do » et CybroOdoo n'est jamais ajouté au repo ni à config.conf).
|
||||
# Placé AVANT la régénération de config (post-étape) pour qu'elle le prenne.
|
||||
if update.config.with_extra and exit_code == 0:
|
||||
rc = update.apply_extra_modules()
|
||||
if rc not in (0, True, None):
|
||||
exit_code = 1
|
||||
|
||||
# Étapes post-install : uniquement si l'installation a RÉUSSI (sinon
|
||||
# .venv.erplibre est absent -> cascade d'erreurs inutiles).
|
||||
if update.config.install_dev and exit_code == 0:
|
||||
|
|
|
|||
Loading…
Reference in a new issue