Merge lp:~akretion-team/openobject-server/trunk-extra-depdencies-info into lp:openobject-server
Status: | Rejected |
---|---|
Rejected by: | Vo Minh Thu |
Proposed branch: | lp:~akretion-team/openobject-server/trunk-extra-depdencies-info |
Merge into: | lp:openobject-server |
Diff against target: |
47 lines (+5/-3) 3 files modified
openerp/addons/base/module/module.py (+2/-0) openerp/modules/db.py (+1/-1) openerp/modules/graph.py (+2/-2) |
To merge this branch: | bzr merge lp:~akretion-team/openobject-server/trunk-extra-depdencies-info |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Vo Minh Thu (community) | Disapprove | ||
Review via email: mp+114172@code.launchpad.net |
Description of the change
DESCRIPTION:
__openerp__.py "depends" module meta information list can now contain a dictionary instead of just the string name, in the case of such a dictionary, the 'name' value of the dictionary will be used instead of the string name. The idea is that we can now use that dictionary to store extra information about the dependencies, like the URL of the repository where a depedency should be downloaded, specially if it's not a "core" addons. This will help the "extra-addons" monolithic branch decommissioning and point the developpers or the installation tools to the proper dependencies versions.
EXAMPLE:
previously we could have the magenerpconnect __openerp__.py module like:
{
"name" : "Magento e-commerce",
"version" : "1.0",
"depends" : ["base",
],
...
Now it could point to the proper modules versions like:
{
"name" : "Magento e-commerce",
"version" : "1.0",
"depends" : ["base",
],
...
RATIONALE:
Due to the open source nature of the OpenERP ecosystem with many small professionals innovating constantly for small businesses over short period of time, during a single 6 months/1 year OpenERP cycle, several version of a third party module can be made. An example was the magentoerpconnect version for which we had a stable 6.1 version and then a new experimental version that has finally become the new stable version at the end of the 6.1 cycle.
Previously we had a big problem for a module to specify its dependencies because we had no way to specify a given repository or version among the several possible versions existing for the given OpenERP release.
Now, we can decide to normalize some specific keys of the new dictionary to specify a repository or a version or even a minimal revision to be used.
In that first iteration, the idea is simply to use that information manually when doing installation of complex modules. But of course, in the future, installation tools (existing ones or new ones) could use it too to provide a one click installation of any complying third party modules.
I did this taking inspiration on how a package manager like Bundler http://
By the way it seems that Python PIP/egg tool is currently not up to the mark as it seems that it cannot fetch Python eggs from code repositories such as git or bzr but can only download dependencies from specific location as mentioned here http://
But again, this is a detail, we are here just making the file format compatible for possible future tooling but we are not implementing any such tooling yet. Third parties could do that as they wish once at least they have the format.
Unmerged revisions
- 4237. By Akretion Bot <email address hidden>
-
[REF] simplification of previous commit allowing dictionaries to describe dependencies; also better if else statements
- 4236. By Akretion Bot <email address hidden>
-
[IMP] __openerp__.py "depends" module meta information list can now contain a dictionary instead of just the string name,
in the case of such a dictionary, the 'name' value of the dictionary will be used instead of the string name.
The idea is that we can now use that dictionary to store extra information about the dependencies,
like the URL of the repository where a depedency should be downloaded, specially if it's not a "core" addons.
This will help the "extra-addons" monolithic branch decommissioning and point the developpers or the installation tools
to the proper dependencies versions.
After much internal discussion about this merge prop. we have decided it was not the way to go.
The merge prop. is pretty simple: make the depends entry a list of dicts instead of a list of strings. But still module versioning and meta-data can become a complicated matter rapidly.
If really needed for your own purpose, I guess you might add another, similarly named entry in the __openerp__.py file.
From a purely technical perspective, your patch would be simpler by having the function `load_informati on_from_ description_ file` in openerp. modules. module return the dicts instead of the strings so the representation is always the same.
A more lenghty view on the matter is given by this merge prop. on the doc: https:/ /code.launchpad .net/~openerp- dev/openobject- server/ trunk-module- versioning- vmt/+merge/ 128668.