summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/perl
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-10-07 22:06:29 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-10-09 14:07:43 +0100
commit20916caa295a45e8281e41b7dfaf5ad6025f08eb (patch)
tree0ce0bef2ef579d68a057162efc8ac1d313660145 /meta/recipes-devtools/perl
parentff4b1d7ba707533f3026f92ce9ba59f80120c938 (diff)
downloadpoky-20916caa295a45e8281e41b7dfaf5ad6025f08eb.tar.gz
perl: Handle PACKAGES_DYNAMIC for perl-native
A perl module recipe extending to provide native version causes target perl dependencies to be pulled into native build if the module recipe has RDEPENDS_${PN} = "perl-module-XXXX" e.g. libxml-sax-base-perl recipe. The reason is that native bbclass empties out PACKAGES_DYNAMIC and perl's PACKAGES_DYNAMIC_class-target is greedy enough to usurp native modules as well. Eventually we end up with errors like when sstate is used across machines * ERROR: libxml-sax-base-perl-native different signature for task do_populate_sysroot.sigdata between qemux86copy and qemuarm Therefore, to fix this native case needs to handled specially when re-assigning module dependencies in split_perl_packages(), where the modules are named correctly for native case and have a single dependency on perl-native, secondly, PACKAGES_DYNAMIC for target case needs to be reined in to spare, -native modules, thirdly, let perl-native take over the case for providing native modules This will fix several sstate signature errors like above with external perl modules providing native variants and having runtime dependencies on modules which are provided by perl proper (From OE-Core rev: 34834d06ceb84221dd53defd27eb94201723d6c5) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/perl')
-rw-r--r--meta/recipes-devtools/perl/perl_5.30.0.bb18
1 files changed, 14 insertions, 4 deletions
diff --git a/meta/recipes-devtools/perl/perl_5.30.0.bb b/meta/recipes-devtools/perl/perl_5.30.0.bb
index a221bce52b..ba2a8437d4 100644
--- a/meta/recipes-devtools/perl/perl_5.30.0.bb
+++ b/meta/recipes-devtools/perl/perl_5.30.0.bb
@@ -265,13 +265,23 @@ python split_perl_packages () {
265 # Read the pre-generated dependency file, and use it to set module dependecies 265 # Read the pre-generated dependency file, and use it to set module dependecies
266 for line in open(d.expand("${WORKDIR}") + '/perl-rdepends.txt').readlines(): 266 for line in open(d.expand("${WORKDIR}") + '/perl-rdepends.txt').readlines():
267 splitline = line.split() 267 splitline = line.split()
268 module = splitline[0].replace("RDEPENDS_perl", "RDEPENDS_${PN}") 268 if bb.data.inherits_class('native', d):
269 depends = splitline[2].strip('"').replace("perl-module", "${PN}-module") 269 module = splitline[0] + '-native'
270 depends = "perl-native"
271 else:
272 module = splitline[0].replace("RDEPENDS_perl", "RDEPENDS_${PN}")
273 depends = splitline[2].strip('"').replace("perl-module", "${PN}-module")
270 d.appendVar(d.expand(module), " " + depends) 274 d.appendVar(d.expand(module), " " + depends)
271} 275}
272 276
273PACKAGES_DYNAMIC_class-target += "^perl-module-.*" 277python() {
274PACKAGES_DYNAMIC_class-nativesdk += "^nativesdk-perl-module-.*" 278 if d.getVar('CLASSOVERRIDE') == "class-target":
279 d.setVar("PACKAGES_DYNAMIC", "^perl-module-.*(?<!native)$")
280 elif d.getVar('CLASSOVERRIDE') == "class-native":
281 d.setVar("PACKAGES_DYNAMIC", "^perl-module-.*-native$")
282 elif d.getVar('CLASSOVERRIDE') == "class-nativesdk":
283 d.setVar("PACKAGES_DYNAMIC", "^nativesdk-perl-module-.*")
284}
275 285
276RDEPENDS_${PN}-misc += "perl perl-modules" 286RDEPENDS_${PN}-misc += "perl perl-modules"
277RDEPENDS_${PN}-pod += "perl" 287RDEPENDS_${PN}-pod += "perl"