]> code.ossystems Code Review - openembedded-core.git/commitdiff
package.bbclass: sort dynamically generated packages
authorAndreas Oberritter <obi@opendreambox.org>
Fri, 9 Mar 2012 21:34:40 +0000 (22:34 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 13 Mar 2012 11:44:46 +0000 (11:44 +0000)
* do_split_packages and package_do_split_locales dynamically add
  packages in order of appearance of os.walk() or os.listdir().
  This order varies between multiple build hosts (and probably
  also between successive builds).
* Sort the list of dynamically added packages, to get a consistent
  and reproducible order.
* This reduces the diffs in buildhistory and improves
  comparability between builds.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
meta/classes/package.bbclass

index 9b6862decf13548236ef017c4b4d17dfc97a0ffc..7bcfa02755d871b561cc98fa85fba2cb4a03ca10 100644 (file)
@@ -116,7 +116,7 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
                        mainpkg = mainpkg.replace('-dev', '')
                extra_depends = mainpkg
 
-       for o in objs:
+       for o in sorted(objs):
                import re, stat
                if match_path:
                        m = re.match(file_regex, o)
@@ -415,7 +415,7 @@ python package_do_split_locales() {
        summary = d.getVar('SUMMARY', True) or pn
        description = d.getVar('DESCRIPTION', True) or "" 
         locale_section = d.getVar('LOCALE_SECTION', True)
-       for l in locales:
+       for l in sorted(locales):
                ln = legitimize_package_name(l)
                pkg = pn + '-locale-' + ln
                packages.append(pkg)