Source: meson
Version: 0.45.0-1
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: randomness toolchain
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0], we noticed
that meson creates non-reproducible pkgconfig files as it iterates
over Python sets.

Patch attached.

 [0] https://reproducible-builds.org/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      la...@debian.org / chris-lamb.co.uk
       `-
diff --git a/mesonbuild/modules/pkgconfig.py b/mesonbuild/modules/pkgconfig.py
index 5573a2e..9b608e9 100644
--- a/mesonbuild/modules/pkgconfig.py
+++ b/mesonbuild/modules/pkgconfig.py
@@ -90,11 +90,11 @@ class DependenciesHelper:
         return processed_libs, processed_reqs, processed_cflags
 
     def remove_dups(self):
-        self.pub_libs = list(set(self.pub_libs))
-        self.pub_reqs = list(set(self.pub_reqs))
-        self.priv_libs = list(set(self.priv_libs))
-        self.priv_reqs = list(set(self.priv_reqs))
-        self.cflags = list(set(self.cflags))
+        self.pub_libs = list(sorted(set(self.pub_libs)))
+        self.pub_reqs = list(sorted(set(self.pub_reqs)))
+        self.priv_libs = list(sorted(set(self.priv_libs)))
+        self.priv_reqs = list(sorted(set(self.priv_reqs)))
+        self.cflags = list(sorted(set(self.cflags)))
 
         # Remove from pivate libs/reqs if they are in public already
         self.priv_libs = [i for i in self.priv_libs if i not in self.pub_libs]

Reply via email to