Merge branch 'develop_fix_optimisation_installation'
- Fix selenium and installation odoo 18 with extra module
This commit is contained in:
commit
8561c6be06
11 changed files with 126 additions and 16 deletions
|
|
@ -33,3 +33,7 @@ EL_GITHUB_TOKEN=""
|
|||
EL_MANIFEST_PROD="./default.xml"
|
||||
EL_MANIFEST_DEV="./manifest/git_manifest_erplibre.xml"
|
||||
EL_LANG="fr"
|
||||
# Verbosité de l'installation (poetry install, repo sync, git daemon).
|
||||
# 0 = silencieux (défaut), 1 = logs détaillés. On respecte une valeur déjà
|
||||
# passée en environnement : EL_VERBOSE=1 make install_odoo_18
|
||||
EL_VERBOSE="${EL_VERBOSE:-0}"
|
||||
|
|
|
|||
|
|
@ -753,7 +753,7 @@
|
|||
name="queue.git"
|
||||
path="odoo12.0/addons/OCA_queue"
|
||||
remote="ERPLibre_origin_OCA"
|
||||
revision="12.0"
|
||||
revision="erplibre/12.0"
|
||||
groups="addons,odoo12.0"
|
||||
/>
|
||||
<project
|
||||
|
|
|
|||
|
|
@ -22,6 +22,14 @@ VENV_ODOO_PATH=".venv.${EL_ERPLIBRE_VERSION}"
|
|||
POETRY_ODOO_PATH=${VENV_ERPLIBRE_PATH}/bin/poetry
|
||||
export WITH_POETRY_INSTALLATION=1
|
||||
|
||||
# Verbosité de l'installation Poetry : silencieuse (-q) par défaut, les logs
|
||||
# détaillés (-vvv) reviennent avec la variable d'environnement EL_VERBOSE=1.
|
||||
if [[ "${EL_VERBOSE:-0}" == "1" ]]; then
|
||||
POETRY_VERBOSE="-vvv"
|
||||
else
|
||||
POETRY_VERBOSE="-q"
|
||||
fi
|
||||
|
||||
# EL_PHASE controls which steps to execute. Used by install_locally_dev.sh
|
||||
# for parallel installation — do not set manually unless you know what you do.
|
||||
# all (default) – full install: setup + poetry phases
|
||||
|
|
@ -83,7 +91,7 @@ if [[ "${EL_PHASE}" != "setup" ]]; then
|
|||
# To fix keyring problem when installation is blocked, use
|
||||
export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
|
||||
if [[ ${WITH_POETRY_INSTALLATION} -ne 0 ]]; then
|
||||
poetry install --no-root -vvv
|
||||
poetry install --no-root ${POETRY_VERBOSE}
|
||||
fi
|
||||
retVal=$?
|
||||
if [[ $retVal -ne 0 ]]; then
|
||||
|
|
|
|||
|
|
@ -2,6 +2,14 @@
|
|||
|
||||
. ./env_var.sh
|
||||
|
||||
# Verbosité de l'installation (git-repo). Silencieuse par défaut ;
|
||||
# EL_VERBOSE=1 rétablit les logs détaillés (repo sync, git daemon).
|
||||
if [ "${EL_VERBOSE:-0}" = "1" ]; then
|
||||
REPO_VERBOSE="-v"; DAEMON_VERBOSE="--verbose"
|
||||
else
|
||||
REPO_VERBOSE="-q"; DAEMON_VERBOSE=""
|
||||
fi
|
||||
|
||||
#EL_MANIFEST_PROD="./default.xml"
|
||||
#EL_MANIFEST_DEV="./manifest/default.dev.xml"
|
||||
|
||||
|
|
@ -10,4 +18,4 @@
|
|||
|
||||
# Update git-repo
|
||||
.venv.erplibre/bin/repo init -u https://github.com/ERPLibre/ERPLibre -b $(git rev-parse --verify HEAD) -m ${EL_MANIFEST_DEV}
|
||||
.venv.erplibre/bin/repo sync -v
|
||||
.venv.erplibre/bin/repo sync ${REPO_VERBOSE}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,19 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
. ./env_var.sh
|
||||
|
||||
# Verbosité de l'installation (git-repo). Silencieuse par défaut ;
|
||||
# EL_VERBOSE=1 rétablit les logs détaillés (repo sync, git daemon).
|
||||
if [ "${EL_VERBOSE:-0}" = "1" ]; then
|
||||
REPO_VERBOSE="-v"; DAEMON_VERBOSE="--verbose"
|
||||
else
|
||||
REPO_VERBOSE="-q"; DAEMON_VERBOSE=""
|
||||
fi
|
||||
#EL_MANIFEST_PROD="./default.xml"
|
||||
#EL_MANIFEST_DEV="./manifest/default.dev.xml"
|
||||
|
||||
# Update git-repo
|
||||
git daemon --base-path=. --export-all --reuseaddr --informative-errors --verbose &
|
||||
git daemon --base-path=. --export-all --reuseaddr --informative-errors ${DAEMON_VERBOSE} &
|
||||
DAEMON_PID=$!
|
||||
|
||||
if [ -L "$EL_MANIFEST_DEV" ]; then
|
||||
|
|
@ -24,6 +32,6 @@ fi
|
|||
.venv.erplibre/bin/python ./script/git/git_merge_repo_manifest.py --output .repo/local_manifests/erplibre_manifest.xml --with_OCA
|
||||
|
||||
.venv.erplibre/bin/repo init -u git://127.0.0.1:9418/ -b $(git rev-parse --verify HEAD) -m ${MANIFEST_TARGET} "$@"
|
||||
.venv.erplibre/bin/repo sync -c -j "$JOBS" -v -m ${MANIFEST_TARGET}
|
||||
.venv.erplibre/bin/repo sync -c -j "$JOBS" ${REPO_VERBOSE} -m ${MANIFEST_TARGET}
|
||||
|
||||
kill ${DAEMON_PID}
|
||||
|
|
|
|||
|
|
@ -2,11 +2,19 @@
|
|||
|
||||
. ./env_var.sh
|
||||
|
||||
# Verbosité de l'installation (git-repo). Silencieuse par défaut ;
|
||||
# EL_VERBOSE=1 rétablit les logs détaillés (repo sync, git daemon).
|
||||
if [ "${EL_VERBOSE:-0}" = "1" ]; then
|
||||
REPO_VERBOSE="-v"; DAEMON_VERBOSE="--verbose"
|
||||
else
|
||||
REPO_VERBOSE="-q"; DAEMON_VERBOSE=""
|
||||
fi
|
||||
|
||||
#EL_MANIFEST_PROD="./default.xml"
|
||||
#EL_MANIFEST_DEV="./manifest/default.dev.xml"
|
||||
|
||||
# Update git-repo
|
||||
git daemon --base-path=. --export-all --reuseaddr --informative-errors --verbose &
|
||||
git daemon --base-path=. --export-all --reuseaddr --informative-errors ${DAEMON_VERBOSE} &
|
||||
DAEMON_PID=$!
|
||||
|
||||
if [ -L "$EL_MANIFEST_DEV" ]; then
|
||||
|
|
@ -25,6 +33,6 @@ fi
|
|||
.venv.erplibre/bin/python ./script/git/git_merge_repo_manifest.py --output .repo/local_manifests/erplibre_manifest.xml --with_OCA
|
||||
|
||||
.venv.erplibre/bin/repo init -u git://127.0.0.1:9418/ -b $(git rev-parse --verify HEAD) -m ${MANIFEST_TARGET} -g base,code_generator
|
||||
.venv.erplibre/bin/repo sync -c -j "$JOBS" -v -m ${MANIFEST_TARGET}
|
||||
.venv.erplibre/bin/repo sync -c -j "$JOBS" ${REPO_VERBOSE} -m ${MANIFEST_TARGET}
|
||||
|
||||
kill ${DAEMON_PID}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,19 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
. ./env_var.sh
|
||||
|
||||
# Verbosité de l'installation (git-repo). Silencieuse par défaut ;
|
||||
# EL_VERBOSE=1 rétablit les logs détaillés (repo sync, git daemon).
|
||||
if [ "${EL_VERBOSE:-0}" = "1" ]; then
|
||||
REPO_VERBOSE="-v"; DAEMON_VERBOSE="--verbose"
|
||||
else
|
||||
REPO_VERBOSE="-q"; DAEMON_VERBOSE=""
|
||||
fi
|
||||
#EL_MANIFEST_PROD="./default.xml"
|
||||
#EL_MANIFEST_DEV="./manifest/default.dev.xml"
|
||||
|
||||
# Update git-repo
|
||||
git daemon --base-path=. --export-all --reuseaddr --informative-errors --verbose &
|
||||
git daemon --base-path=. --export-all --reuseaddr --informative-errors ${DAEMON_VERBOSE} &
|
||||
DAEMON_PID=$!
|
||||
|
||||
if [ -L "$EL_MANIFEST_DEV" ]; then
|
||||
|
|
@ -24,6 +32,6 @@ fi
|
|||
.venv.erplibre/bin/python ./script/git/git_merge_repo_manifest.py --output .repo/local_manifests/erplibre_manifest.xml --with_mobile
|
||||
|
||||
.venv.erplibre/bin/repo init -u git://127.0.0.1:9418/ -b $(git rev-parse --verify HEAD) -m ${MANIFEST_TARGET} "$@"
|
||||
.venv.erplibre/bin/repo sync -c -j "$JOBS" -v -m ${MANIFEST_TARGET}
|
||||
.venv.erplibre/bin/repo sync -c -j "$JOBS" ${REPO_VERBOSE} -m ${MANIFEST_TARGET}
|
||||
|
||||
kill ${DAEMON_PID}
|
||||
|
|
|
|||
|
|
@ -2,11 +2,19 @@
|
|||
|
||||
. ./env_var.sh
|
||||
|
||||
# Verbosité de l'installation (git-repo). Silencieuse par défaut ;
|
||||
# EL_VERBOSE=1 rétablit les logs détaillés (repo sync, git daemon).
|
||||
if [ "${EL_VERBOSE:-0}" = "1" ]; then
|
||||
REPO_VERBOSE="-v"; DAEMON_VERBOSE="--verbose"
|
||||
else
|
||||
REPO_VERBOSE="-q"; DAEMON_VERBOSE=""
|
||||
fi
|
||||
|
||||
#EL_MANIFEST_PROD="./default.xml"
|
||||
#EL_MANIFEST_DEV="./manifest/default.dev.xml"
|
||||
|
||||
# Update git-repo
|
||||
git daemon --base-path=. --export-all --reuseaddr --informative-errors --verbose &
|
||||
git daemon --base-path=. --export-all --reuseaddr --informative-errors ${DAEMON_VERBOSE} &
|
||||
DAEMON_PID=$!
|
||||
|
||||
if [ -L "$EL_MANIFEST_DEV" ]; then
|
||||
|
|
@ -25,6 +33,6 @@ fi
|
|||
.venv.erplibre/bin/python ./script/git/git_merge_repo_manifest.py --output .repo/local_manifests/erplibre_manifest.xml --with_OCA
|
||||
|
||||
.venv.erplibre/bin/repo init -u git://127.0.0.1:9418/ -b $(git rev-parse --verify HEAD) -m ${MANIFEST_TARGET}
|
||||
.venv.erplibre/bin/repo sync -c -j "$JOBS" -v -m ${MANIFEST_TARGET}
|
||||
.venv.erplibre/bin/repo sync -c -j "$JOBS" ${REPO_VERBOSE} -m ${MANIFEST_TARGET}
|
||||
|
||||
kill ${DAEMON_PID}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,14 @@
|
|||
|
||||
. ./env_var.sh
|
||||
|
||||
# Verbosité de l'installation (git-repo). Silencieuse par défaut ;
|
||||
# EL_VERBOSE=1 rétablit les logs détaillés (repo sync, git daemon).
|
||||
if [ "${EL_VERBOSE:-0}" = "1" ]; then
|
||||
REPO_VERBOSE="-v"; DAEMON_VERBOSE="--verbose"
|
||||
else
|
||||
REPO_VERBOSE="-q"; DAEMON_VERBOSE=""
|
||||
fi
|
||||
|
||||
#EL_MANIFEST_PROD="./default.xml"
|
||||
#EL_MANIFEST_DEV="./manifest/default.dev.xml"
|
||||
|
||||
|
|
@ -16,4 +24,4 @@ fi
|
|||
|
||||
# Update git-repo
|
||||
.venv.erplibre/bin/repo init -u https://github.com/ERPLibre/ERPLibre -b $(git rev-parse --verify HEAD)
|
||||
.venv.erplibre/bin/repo sync -v -j "$JOBS"
|
||||
.venv.erplibre/bin/repo sync ${REPO_VERBOSE} -j "$JOBS"
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import time
|
|||
import tkinter as tk
|
||||
from pathlib import Path
|
||||
from tkinter import filedialog
|
||||
from typing import Optional
|
||||
|
||||
from pykeepass import PyKeePass
|
||||
from randomwordfr import RandomWordFr
|
||||
|
|
@ -312,7 +313,12 @@ class SeleniumLib(object):
|
|||
command_executor=driver_url,
|
||||
)
|
||||
else:
|
||||
firefox_options.add_argument("-remote-allow-system-access")
|
||||
# NE PAS passer « -remote-allow-system-access » : les
|
||||
# geckodriver récents le REFUSENT via les capabilities
|
||||
# (« Argument --remote-allow-system-access can't be set via
|
||||
# capabilities ») et gèrent seuls l'accès système du Firefox
|
||||
# snap. Le passer cassait TOUS les setups sur geckodriver
|
||||
# récent (pas seulement snap/Ubuntu).
|
||||
self.driver = webdriver.Firefox(
|
||||
options=firefox_options,
|
||||
service=firefox_services,
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
@ -709,6 +731,11 @@ def main():
|
|||
update.validate_version()
|
||||
|
||||
_logger.info("Validate environment")
|
||||
# exit_code : propagé à sys.exit() -> une install qui ÉCHOUE renvoie un
|
||||
# code non nul (avant, main() ne sortait jamais en erreur : le suivi
|
||||
# d'installation affichait ✅ même quand poetry/pyenv plantaient).
|
||||
# Rappel os.system : 0 = succès ; toute autre valeur = échec.
|
||||
exit_code = 0
|
||||
status = 0
|
||||
if (
|
||||
update.config.install_dev
|
||||
|
|
@ -718,16 +745,31 @@ def main():
|
|||
status = update.validate_environment()
|
||||
if update.config.install:
|
||||
status = update.install_system()
|
||||
if status not in (0, True, None):
|
||||
exit_code = 1
|
||||
if (
|
||||
update.config.force_install
|
||||
or update.config.install_dev
|
||||
or update.config.partial_install
|
||||
or update.config.is_in_switch
|
||||
) and not status:
|
||||
update.update_environment()
|
||||
rc = update.update_environment()
|
||||
if rc not in (0, True, None):
|
||||
exit_code = 1
|
||||
update.print_log()
|
||||
|
||||
if update.config.install_dev:
|
||||
# --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:
|
||||
# Update pycharm configuration
|
||||
update.pycharm_update()
|
||||
|
||||
|
|
@ -736,6 +778,8 @@ def main():
|
|||
"./.venv.erplibre/bin/python ./script/git/git_repo_update_group.py"
|
||||
)
|
||||
os.system("./script/generate_config.sh")
|
||||
|
||||
return exit_code
|
||||
# TODO ignore this if installation fail
|
||||
|
||||
# TODO this cause an error at first execution, need to source ./.venv.erplibre/bin/activate and rerun
|
||||
|
|
@ -756,4 +800,4 @@ def die(cond, message, code=1):
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
sys.exit(main() or 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue