Skip to contentSkip to conversation

package: Improve determinism

PATCH New Daniel Klauer 1 participant 1 message Jul 29, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package: Improve determinism

From: Richard Purdie <[email protected]>

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.

---
 meta/classes/package.bbclass | 2 +-
 meta/lib/oe/package.py       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
meta/classes/package.bbclass +1 -1
index 8b89fb1129..e67bb5bd97 100644
@@ -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)
meta/lib/oe/package.py +1 -1
index b59513227b..b8585d4253 100644
@@ -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)
Signature · 1 line
2.17.1