]> code.ossystems Code Review - openembedded-core.git/commitdiff
package: Improve determinism
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 25 Jul 2019 21:54:34 +0000 (22:54 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 26 Jul 2019 07:41:02 +0000 (08:41 +0100)
Its possible in cases with multiple shlib providers we were not being
deterministic. Add in a couple of sorted() calls to fix the shlibs and
pkgconfig cases with this potential issue.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package.bbclass
meta/lib/oe/package.py

index 8b89fb112901dbdbd575738308ef7f52ab8a8dee..e67bb5bd97d21f10d357b50d7e9cd78ed50565d2 100644 (file)
@@ -1924,7 +1924,7 @@ python package_do_pkgconfig () {
     for dir in reversed(shlibs_dirs):
         if not os.path.exists(dir):
             continue
-        for file in os.listdir(dir):
+        for file in sorted(os.listdir(dir)):
             m = re.match(r'^(.*)\.pclist$', file)
             if m:
                 pkg = m.group(1)
index b59513227baa0ea6a12ffabe9352469718e38244..b8585d4253fe72823f24e5416144a9c48c595755 100644 (file)
@@ -265,7 +265,7 @@ def read_shlib_providers(d):
         bb.debug(2, "Reading shlib providers in %s" % (dir))
         if not os.path.exists(dir):
             continue
-        for file in os.listdir(dir):
+        for file in sorted(os.listdir(dir)):
             m = list_re.match(file)
             if m:
                 dep_pkg = m.group(1)