Community mailing list archives

community@mail.odoo.com

Re: broken Travis builds in OCA repositories

by
Agile Business Group sagl, Lorenzo Battistini - Software Engineer, Agile Business Group
- 03/25/2015 08:03:36
On 25 March 2015 at 09:00, Lorenzo Battistini <lorenzo.battistini@agilebg.com> wrote:
On 25 March 2015 at 08:48, Nicolas Bessi <nicolas.bessi@camptocamp.com> wrote:
Hello, 

I have noticed following bugs. 
More may come with the successive travis run.




Can somebody indicate me how 'auth_ldap' correctly raises warning when 'ldap' is missing?



I did some investigation.

auth_ldap's __openerp__.py contains

    'external_dependencies' : {
        'python' : ['ldap'],
    }

(just like base_report_to_printer contains dependency on 'cups')

When 'ldap' python module is not installed in the system, odoo can start without errors. When user tries to install auth_ldap gets
"Unable to install module "auth_ldap" because an external dependency is not met: No module named ldap"

odoo loads modules here
The difference between auth_ldap and base_report_to_printer consists in lack of 'static' folder within auth_ldap.
Thus, at start time, auth_ldap is not loaded, nor import ldap is executed. So, no exception is raised.


Anyway, returning to Alexandre question, I think option 1 is the most appropriate, because, if external dep is uninstalled, when user tries to install the module, check_external_dependencies is executed and user gets (for example in case of base_report_to_printer)
"Unable to install module "base_report_to_printer" because an external dependency is not met: No module named cups"

So, system would not crash when addon is used, but warning message would be displayed.

Regards


-- 
Lorenzo Battistini
Tel (CH): +41 91 210 23 40
Tel (IT): +39 011 198 25481

On 25 March 2015 at 09:00, Lorenzo Battistini <lorenzo.battistini@agilebg.com> wrote:
On 25 March 2015 at 08:48, Nicolas Bessi <nicolas.bessi@camptocamp.com> wrote:
Hello, 

I have noticed following bugs. 
More may come with the successive travis run.




Can somebody indicate me how 'auth_ldap' correctly raises warning when 'ldap' is missing?

Thanks
 

--
Lorenzo Battistini
Tel (IT): +39 011 198 25481



--
Lorenzo Battistini
Tel (CH): +41 91 210 23 40
Tel (IT): +39 011 198 25481