summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-29 13:30:59 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-23 23:14:17 +0100
commit63b5e198b4e8ccecdcfcbec042fa68fb8a7cfd3c (patch)
tree00001b5d35bfbc1736f36fa1badbc0d87ce7407b /meta/classes
parent83b827e3d6835ef62cb2db3fc7505679ae727529 (diff)
downloadpoky-63b5e198b4e8ccecdcfcbec042fa68fb8a7cfd3c.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. (From OE-Core rev: 00615c9edb8b9b644e853453603846eddfff2054) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit e422e29bca4af3ab4073e04490f38b05cd7c38c0) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-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 3ff74c9f31..702427fecc 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1989,12 +1989,12 @@ python package_do_pkgconfig () {
1989 for pkg in packages.split(): 1989 for pkg in packages.split():
1990 pkgconfig_provided[pkg] = [] 1990 pkgconfig_provided[pkg] = []
1991 pkgconfig_needed[pkg] = [] 1991 pkgconfig_needed[pkg] = []
1992 for file in pkgfiles[pkg]: 1992 for file in sorted(pkgfiles[pkg]):
1993 m = pc_re.match(file) 1993 m = pc_re.match(file)
1994 if m: 1994 if m:
1995 pd = bb.data.init() 1995 pd = bb.data.init()
1996 name = m.group(1) 1996 name = m.group(1)
1997 pkgconfig_provided[pkg].append(name) 1997 pkgconfig_provided[pkg].append(os.path.basename(name))
1998 if not os.access(file, os.R_OK): 1998 if not os.access(file, os.R_OK):
1999 continue 1999 continue
2000 with open(file, 'r') as f: 2000 with open(file, 'r') as f:
@@ -2017,7 +2017,7 @@ python package_do_pkgconfig () {
2017 pkgs_file = os.path.join(shlibswork_dir, pkg + ".pclist") 2017 pkgs_file = os.path.join(shlibswork_dir, pkg + ".pclist")
2018 if pkgconfig_provided[pkg] != []: 2018 if pkgconfig_provided[pkg] != []:
2019 with open(pkgs_file, 'w') as f: 2019 with open(pkgs_file, 'w') as f:
2020 for p in pkgconfig_provided[pkg]: 2020 for p in sorted(pkgconfig_provided[pkg]):
2021 f.write('%s\n' % p) 2021 f.write('%s\n' % p)
2022 2022
2023 # Go from least to most specific since the last one found wins 2023 # Go from least to most specific since the last one found wins