linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Linphone-developers] [PATCH] Sort input file list


From: Bernhard M. Wiedemann
Subject: [Linphone-developers] [PATCH] Sort input file list
Date: Thu, 12 Apr 2018 09:08:17 +0200

so that liblinphone++.so builds in a reproducible way
in spite of indeterministic filesystem readdir order

---
While working on the reproducible builds effort, I found that
when building the linphone package for openSUSE Linux (in disposable VMs),
there were differences between each build,
because ordering of functions in linphone++.cc
depended on the indeterministic filesystem order.
---
 tools/genapixml.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/genapixml.py b/tools/genapixml.py
index 29a0dedf8..3f94ae6f0 100755
--- a/tools/genapixml.py
+++ b/tools/genapixml.py
@@ -632,7 +632,7 @@ class Project:
                self.__discoverClasses()
 
        def initFromDir(self, xmldir):
-               files = [ os.path.join(xmldir, f) for f in os.listdir(xmldir) 
if (os.path.isfile(os.path.join(xmldir, f)) and f.endswith('.xml')) ]
+               files = [ os.path.join(xmldir, f) for f in 
sorted(os.listdir(xmldir)) if (os.path.isfile(os.path.join(xmldir, f)) and 
f.endswith('.xml')) ]
                self.initFromFiles(files)
 
        def check(self):
-- 
2.13.6




reply via email to

[Prev in Thread] Current Thread [Next in Thread]