From 71aba63b0344f100f80237c57c32d135a3145aac Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Fri, 31 Jul 2026 00:59:49 -0400 Subject: [PATCH] =?UTF-8?q?[FIX]=20install:=20--with=5Fextra=20sans=20effe?= =?UTF-8?q?t=20sur=20un=20env=20d=C3=A9j=C3=A0=20install=C3=A9=20(CybroOdo?= =?UTF-8?q?o)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit « 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) --- script/version/update_env_version.py | 31 ++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/script/version/update_env_version.py b/script/version/update_env_version.py index 5f7d6e5..ca265b1 100755 --- a/script/version/update_env_version.py +++ b/script/version/update_env_version.py @@ -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: