anybox.recipe.odoo
anybox.recipe.odoo copied to clipboard
extract-downloads-to should only extract sources...
The extract-downloads-to is a useful option that allows to aggregate sources into a self-contained archive. However, its current implementation does not allows to use it with the merge option. This limitation is mainly due to the fact that whatever of the command, the system always tries to retrieve main software, addons and merges in offline mode. (The last one is not compatible with the offline mode).
I propose to modify the extract-download-to command to isolate the process from others steps required by a simple installation. In this way the install and freeze-to commands will not be enforced by the extract-download-to command. After this change, it will be possible to extract the sources at any time and build distributions that include merges in a self-contained archive and deployable on a server without access to VCS systems.
A better solution is maybe to create a dedicated recipe to cleanly separate the steps involved in the server installation and those required to package the sources. Suggestions are welcome.
As a first draft, I've developed a new dedicated recipe. The recipe extends the ServerRecipe and overrides the def install(self): method.
The easiest way to test the recipe is to write a new section in your buildout that extends the server section.
[openerp_release]
<= openerp
recipe = anybox.recipe.odoo[bzr]:release
release-dir = release
clean-dir = true
Two additional options are supported by the recipe.
- release-dir: The target directory in which the sources have to be extracted,
- clean-dir: 'true' if the target directory can be deleted if it exists. (If the directory exists and the option is not specified, a UserError is raised)