From 4710f2a56b3a17be058c5f27ceeb173a03cbb931 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul=20=28ACSONE=29?= Date: Sat, 2 Jun 2018 09:45:48 +0200 Subject: [PATCH] module_auto_update: readme fragments --- module_auto_update/readme/CONFIGURE.rst | 9 +++++++++ module_auto_update/readme/CONTRIBUTORS.rst | 4 ++++ module_auto_update/readme/DESCRIPTION.rst | 4 ++++ module_auto_update/readme/ROADMAP.rst | 17 +++++++++++++++++ module_auto_update/readme/USAGE.rst | 16 ++++++++++++++++ 5 files changed, 50 insertions(+) create mode 100644 module_auto_update/readme/CONFIGURE.rst create mode 100644 module_auto_update/readme/CONTRIBUTORS.rst create mode 100644 module_auto_update/readme/DESCRIPTION.rst create mode 100644 module_auto_update/readme/ROADMAP.rst create mode 100644 module_auto_update/readme/USAGE.rst diff --git a/module_auto_update/readme/CONFIGURE.rst b/module_auto_update/readme/CONFIGURE.rst new file mode 100644 index 000000000..b46e74563 --- /dev/null +++ b/module_auto_update/readme/CONFIGURE.rst @@ -0,0 +1,9 @@ +This module supports the following system parameters: + +* ``module_auto_update.exclude_patterns``: comma-separated list of file + name patterns to ignore when computing addon checksums. Defaults to + ``*.pyc,*.pyo,i18n/*.pot,i18n_extra/*.pot,static/*``. + Filename patterns must be compatible with the python ``fnmatch`` function. + +In addition to the above pattern, .po files corresponding to languages that +are not installed in the Odoo database are ignored when computing checksums. diff --git a/module_auto_update/readme/CONTRIBUTORS.rst b/module_auto_update/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..966ffea55 --- /dev/null +++ b/module_auto_update/readme/CONTRIBUTORS.rst @@ -0,0 +1,4 @@ +* Brent Hughes +* Juan José Scarafía +* Jairo Llopis +* Stéphane Bidoul (https://acsone.eu) diff --git a/module_auto_update/readme/DESCRIPTION.rst b/module_auto_update/readme/DESCRIPTION.rst new file mode 100644 index 000000000..1c1cd09b1 --- /dev/null +++ b/module_auto_update/readme/DESCRIPTION.rst @@ -0,0 +1,4 @@ +This addon provides mechanisms to compute sha1 hashes of installed addons, +and save them in the database. It also provides a method that exploits these +mechanisms to update a database by upgrading only the modules for which the +hash has changed since the last successful upgrade. diff --git a/module_auto_update/readme/ROADMAP.rst b/module_auto_update/readme/ROADMAP.rst new file mode 100644 index 000000000..19dad6fdc --- /dev/null +++ b/module_auto_update/readme/ROADMAP.rst @@ -0,0 +1,17 @@ +* Since version ``2.0.0``, some features have been deprecated. + When you upgrade from previous versions, these features will be kept for + backwards compatibility, but beware! They are buggy! + + If you install this addon from scratch, these features are disabled by + default. + + To force enabling or disabling the deprecated features, set a configuration + parameter called ``module_auto_update.enable_deprecated`` to either ``1`` + or ``0``. It is recommended that you disable them. + + Keep in mind that from this version, all upgrades are assumed to run in a + separate odoo instance, dedicated exclusively to upgrade Odoo. + +* When migrating the addon to new versions, the deprecated features should be + removed. To make it simple all deprecated features are found in files + suffixed with ``_deprecated``. diff --git a/module_auto_update/readme/USAGE.rst b/module_auto_update/readme/USAGE.rst new file mode 100644 index 000000000..56b4ea468 --- /dev/null +++ b/module_auto_update/readme/USAGE.rst @@ -0,0 +1,16 @@ +The main method provided by this module is ``upgrade_changed_checksum`` +on ``ir.module.module``. It runs a database upgrade for all installed +modules for which the hash has changed since the last successful +run of this method. On success it saves the hashes in the database. + +The first time this method is invoked after installing the module, it +runs an upgrade of all modules, because it has not saved the hashes yet. +This is by design, priviledging safety. Should this be an issue, +the method ``_save_installed_checksums`` can be invoked in a situation +where one is sure all modules on disk are installed and up-to-date in the +database. + +An easy way to invoke this upgrade mechanism is by issuing the following +in an Odoo shell session:: + + env['ir.module.module'].upgrade_changed_checksum()