summaryrefslogtreecommitdiffstats
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-08 20:52:32 +0100
commit34834d06ceb84221dd53defd27eb94201723d6c5 (patch)
treef0f2aadd2e3d9ae00db72b6049ad7d3a05956e3a
parent0f09c5b7a9a66af825951354b436b69dd9a596a4 (diff)
downloadopenembedded-core-34834d06ceb84221dd53defd27eb94201723d6c5.tar.gz
openembedded-core-34834d06ceb84221dd53defd27eb94201723d6c5.tar.bz2
openembedded-core-34834d06ceb84221dd53defd27eb94201723d6c5.zip
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 Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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 () {
# Read the pre-generated dependency file, and use it to set module dependecies
for line in open(d.expand("${WORKDIR}") + '/perl-rdepends.txt').readlines():
splitline = line.split()
- module = splitline[0].replace("RDEPENDS_perl", "RDEPENDS_${PN}")
- depends = splitline[2].strip('"').replace("perl-module", "${PN}-module")
+ if bb.data.inherits_class('native', d):
+ module = splitline[0] + '-native'
+ depends = "perl-native"
+ else:
+ module = splitline[0].replace("RDEPENDS_perl", "RDEPENDS_${PN}")
+ depends = splitline[2].strip('"').replace("perl-module", "${PN}-module")
d.appendVar(d.expand(module), " " + depends)
}
-PACKAGES_DYNAMIC_class-target += "^perl-module-.*"
-PACKAGES_DYNAMIC_class-nativesdk += "^nativesdk-perl-module-.*"
+python() {
+ if d.getVar('CLASSOVERRIDE') == "class-target":
+ d.setVar("PACKAGES_DYNAMIC", "^perl-module-.*(?<!native)$")
+ elif d.getVar('CLASSOVERRIDE') == "class-native":
+ d.setVar("PACKAGES_DYNAMIC", "^perl-module-.*-native$")
+ elif d.getVar('CLASSOVERRIDE') == "class-nativesdk":
+ d.setVar("PACKAGES_DYNAMIC", "^nativesdk-perl-module-.*")
+}
RDEPENDS_${PN}-misc += "perl perl-modules"
RDEPENDS_${PN}-pod += "perl"