Skip to content

Draft: TemplateTool: resolve provision dependency by satisfied provider dependencies and version restricted

When a BT5 depends on a provision BT5 name, the resolver previously had only one rule: pick the only candidate.

If there were two or more candidates, it would show:

"Select one of the following business templates: xxxx,yyy..."

This change improves the resolver by adding a new rule:

For each candidate, inspect its own dependency_list and select the candidate matchs version restricted and whose dependencies are already installed or scheduled to be installed.

If multiple candidates still match, raise an explicit error so the ambiguity remains visible.

One improved use case is an instance where only the bootstrap BT5s (erp5_core, erp5_jquery, erp5_mysql_innodb_catalog, erp5_property_sheets, erp5_xhtml_style) are installed.

When installing erp5_base:

  • Before this change, the resolver asked the user to select one of the following business templates:[erp5_full_text_mroonga_catalog, erp5_full_text_myisam_catalog, erp5_full_text_sphinxse_catalog]

  • After this change, erp5_full_text_mroonga_catalog is selected automatically.

TODO

  • add tests
  • change dependency from erp5_full_text_mroonga_catalog to erp5_full_text_catalog
Edited by Xiaowu Zhang

Merge request reports