I am developing a product for Plone, say foo.core . In addition to this main product, there are also several related products. like foo.optional . These released products may be available in an instance, and if available, they may be installed (in other words: I cannot assume that the code is available or, if any, should be used).
These related products may override the settings made by foo.core (for example, in the Property Sheet). This works fine, but if I reinstall foo.core , the default settings will return. I would like to somehow automatically reinstall foo.optional when foo.core reinstalled in QuickInstaller.
The solutions that I could offer are as follows:
- When
foo.optional installed, it registers with foo.core . the latter, foo.core , will handle reinstalling all registered products when the main package is reinstalled. - The
foo.core package raises an event that packages, such as foo.optional , can listen. The event handler will then run the reinstallation of foo.optional . - Make sure that
foo.core does not overwrite any settings that may have been changed later by other products.
Perhaps there are more alternatives? What will be the Plonish approach?
Edit: I know that using update steps may be better than reinstalling the product. However, the IMHO problem remains the same: the Generic Setup profile used for the upgrade phase may have a parameter that changes in the Generic Setup profile for the foo.optional package.
Thus, using update steps makes my task harder: how do I determine whether to reinstall / update the update phase foo.core means foo.optional ? (It is still assumed that foo.core is basically unaware of foo.optional .)
source share