Bug#892515: meson: please make the generated pkgconfig files reproducible
Chris Lamb
lamby at debian.org
Sat Mar 10 01:08:20 UTC 2018
Source: meson
Version: 0.45.0-1
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: randomness toolchain
X-Debbugs-Cc: reproducible-bugs at 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
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
-------------- next part --------------
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]
More information about the Reproducible-bugs
mailing list