• Jérome Perrin's avatar
    TemplateTool: install business templates in deterministic order · 8eb0ddde
    Jérome Perrin authored
    When a business template has multiple dependencies, these dependencies
    were installed in an order defined by iteration in dictionaries, which
    is not deterministic when using a random PYTHONHASHSEED on python2.
    As an example, when we have business template "b" depending on "b1" and
    "b2", the only guarantee was that "b" would be installed after "b1" and
    "b2", but which one of "b1" and "b2" is installed first was undefined,
    now it is stable, "b1" should be installed before "b2", because we added
    a sort. In practice it should not matter, because if in that example
    "b2" really needs to be installed after "b1", then "b2" should declare a
    dependency on "b1".
    test_resolveBusinessTemplateListDependency was failing on python3
    because the order on python3 was different from the one using
    PYTHONHASHSEED=0 on python2.