Commit 8766f2cc authored by Gabriel Monnerat's avatar Gabriel Monnerat

Template Tool: Ignore totally the update of Business Templates that are inside keep_bt5_id_set

parent 41d082de
......@@ -1524,7 +1524,8 @@ class TemplateTool (BaseTool):
update_bt5_list.sort(key=lambda x: dependency_list.index(x.title))
for bt5 in update_bt5_list:
reinstall = bt5.title in deprecated_reinstall_set
if not(reinstall) and bt5.version_state == 'present':
if (not(reinstall) and bt5.version_state == 'present') or \
bt5.title in keep_bt5_id_set:
continue
append("Update %s business template in state %s%s" % \
(bt5.title, bt5.version_state, (reinstall and ' (reinstall)') or ''))
......
  • @gabriel Why did you introduced this change? Such change means that at some point a bt5 that is in the keep_bt5_id_set will move to being a dependency of a required bt5, it will not be updated on current systems or installed on new systems.

  • @cedric.leninivin This was introduced by upgrader and is used when you want to upgrade your instance but some bt5 should be ignored, for example, project_data or project_security. So, if you are using keep_bt5_id_set, you don't want to touch the bt5.

    Sorry, I did not understand the part of "keep_bt5_id_set will move to being a dependency of a required bt5".

  • I had the problem using an upgrader on a new system. The problematic bt5, erp5_code_mirror, was listed in my keep_bt5_id_set but is now a dependency of erp5_officejs(27a96d0b). As result of using the upgrader in such situation, installation failed because erp5_code_mirror was not installed. For the implementation of "keep_bt5_id_set" either the name of the variable is poorly choosen and should be "keep_in_current_state_bt5_id_set" or implementation should be changed to behave as "Do not remove feature" which the name imply.

  • Probably you need a configurator instead of an upgrader. Upgrader is used to upgrade an instance, not setup/deploy.

    If you have erp5_code_mirror in keep_bt5_id_set, you are saying that you don't want to touch it, installed or not. I have to agree that keep_bt5_id_set is too generic, maybe ignore_bt5_id_set will make more sense.

    But, I disagree that erp5_code_mirror should be installed if you set in the list.

    For me, you just need fix your upgrader adding an pre-upgrade to install erp5_code_mirror if not installed. With this, you can run upgrader without problem even with erp5_code_mirror in keep_bt5_id_set.

  • And of course, you can use upgrader on a new system but you need declare carefully what you want to do.

  • Well, it should be considered than running a upgrader on a new system is the same as running one an already existing system. The configurator is introduced after that step.

    But, I disagree that erp5_code_mirror should be installed if you set in the list.

    What is your use case?

Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment