generate-manifest: preserve the package order
generate-manifest: preserve the package order

The algorithm for population of packages used by OE walks the PACKAGES
list from its beginning, picking up files that match the glob patterns
for currently processed package. Once the file has been populated inside
one package, it will not be included in any other package. With the
way the current manifest files is generated, files may end up being
included in incorrect package.

The current manifest generation uses a
reverse(sorted(<packages-list>)). In such case, for example an
erlang-erts package will come before erlang-dialyzer package. As such,
according to package population rule, erlang-erts having a wider glob
pattern will pick up both correct and incorrect (in this case
${libdir}/erlang/bin/dialyzer) files.

The patch allows for preserving the order in which the packages are
added through Maker.addPackage() call. A necessary reordering of modules
makes sure that the wide patterns (like in erlang-erts) will come last.

The implementation uses an collections.OrderedDict, so a bump to
python2.7 is required.

Signed-off-by: Maciej Borzecki <f609d9f713abcd5f8f0e51f08dc151638a7681e7@open-rnd.pl>

joaohf/meta-erlang,joaohf/meta-erlang