summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-29 13:30:59 +0100
committerAnuj Mittal <anuj.mittal@intel.com>2021-10-20 15:35:52 +0800
commit59655c76c395ffaae0342458a6a2ce0494b8e1a6 (patch)
tree95c61c28b83285e1a1c75eb651f81339aef9ca78
parent16d6f01eced9e6de5068056aea07a08ec9dfb659 (diff)
downloadopenembedded-core-59655c76c395ffaae0342458a6a2ce0494b8e1a6.tar.gz
package: Ensure pclist files are deterministic and don't use full paths
Currently the pkgconfig pclist files contain full paths which are build host specific and the order of entries is not deterministic. Fix both these issues so the files are deterministic. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit e422e29bca4af3ab4073e04490f38b05cd7c38c0) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
-rw-r--r--meta/classes/package.bbclass6
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index e3f0a7060b..5e51b89184 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -2079,12 +2079,12 @@ python package_do_pkgconfig () {
for pkg in packages.split():
pkgconfig_provided[pkg] = []
pkgconfig_needed[pkg] = []
- for file in pkgfiles[pkg]:
+ for file in sorted(pkgfiles[pkg]):
m = pc_re.match(file)
if m:
pd = bb.data.init()
name = m.group(1)
- pkgconfig_provided[pkg].append(name)
+ pkgconfig_provided[pkg].append(os.path.basename(name))
if not os.access(file, os.R_OK):
continue
with open(file, 'r') as f:
@@ -2107,7 +2107,7 @@ python package_do_pkgconfig () {
pkgs_file = os.path.join(shlibswork_dir, pkg + ".pclist")
if pkgconfig_provided[pkg] != []:
with open(pkgs_file, 'w') as f:
- for p in pkgconfig_provided[pkg]:
+ for p in sorted(pkgconfig_provided[pkg]):
f.write('%s\n' % p)
# Go from least to most specific since the last one found wins