summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiangyu Chen <xiangyu.chen@windriver.com>2023-07-21 11:05:20 +0200
committerSteve Sakoman <steve@sakoman.com>2023-07-26 05:20:36 -1000
commit6539812e238edfefc0941abeabbbebe345c0cd3b (patch)
tree84a5d3c46c8d61af4558a91c3e0048f465056f5c
parent55e4c90abf9424323e15f06af7be40966b3e063a (diff)
downloadpoky-6539812e238edfefc0941abeabbbebe345c0cd3b.tar.gz
package.bbclass: moving field data process before variable process in process_pkgconfig
Currently, the latest version abseil-cpp contains a new library named "absl_log_internal_format", it's basic package config(.pc file) as below: prefix=/usr exec_prefix=${prefix} ...... Requires: absl_config = 20230125, absl_core_headers = 20230125, absl_log_internal_append_truncated = 20230125, absl_log_internal_config = 20230125, absl_log_internal_globals = 20230125, absl_log_severity = 20230125, absl_strings = 20230125, absl_str_format = 20230125, absl_time = 20230125, absl_span = 20230125 ...... Normally, the process_pkgconfig() would process variable data before field data in a .pc file, but in the absl_log_internal_format, the field data in "Requires" section contains "xxxx = xxxx" format, the process_pkgconfig() treats them as normal variable and using the setVar() in bitbake's data_smart.py try to process. The absl_log_internal_format field data contains "_append_", this hit the setVar() checking and finally bitbake stop building and reporting an error as below: "Variable xxx contains an operation using the old override syntax. Please convert this layer/metadata before attempting to use with a newer bitbake." This patch move the field data process before variable process to avoid the process_pkgconfig() treat the field data as variable. (From OE-Core rev: e7d3e02a624f7ce23d012bb11ad1df2049066b37) Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com> (cherry picked from commit a73e269d3e591a10bb397b94b82e3fb960112d33) Signed-off-by: Clément Péron <peron.clem@gmail.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/classes/package.bbclass12
1 files changed, 6 insertions, 6 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index fed2f5531d..67351b2510 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -2178,18 +2178,18 @@ python package_do_pkgconfig () {
2178 with open(file, 'r') as f: 2178 with open(file, 'r') as f:
2179 lines = f.readlines() 2179 lines = f.readlines()
2180 for l in lines: 2180 for l in lines:
2181 m = var_re.match(l)
2182 if m:
2183 name = m.group(1)
2184 val = m.group(2)
2185 pd.setVar(name, pd.expand(val))
2186 continue
2187 m = field_re.match(l) 2181 m = field_re.match(l)
2188 if m: 2182 if m:
2189 hdr = m.group(1) 2183 hdr = m.group(1)
2190 exp = pd.expand(m.group(2)) 2184 exp = pd.expand(m.group(2))
2191 if hdr == 'Requires': 2185 if hdr == 'Requires':
2192 pkgconfig_needed[pkg] += exp.replace(',', ' ').split() 2186 pkgconfig_needed[pkg] += exp.replace(',', ' ').split()
2187 continue
2188 m = var_re.match(l)
2189 if m:
2190 name = m.group(1)
2191 val = m.group(2)
2192 pd.setVar(name, pd.expand(val))
2193 2193
2194 for pkg in packages.split(): 2194 for pkg in packages.split():
2195 pkgs_file = os.path.join(shlibswork_dir, pkg + ".pclist") 2195 pkgs_file = os.path.join(shlibswork_dir, pkg + ".pclist")