Fix nativesdk-perl dependency
cover Fix nativesdk-perl dependency
Fix nativesdk-perl dependency issue and Yocto 3100:autoreconf run failed on x86-64 gmae-toolchain
The following changes since commit 0260bb5c6978839c068007fcff2f704937805faf:
gitignore: Fix for poky repository (2012-10-11 13:52:14 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib kangkai/distro
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=kangkai/distro
Kang Kai (1):
nativesdk-packagegroup-sdk-host: add perl modules
Robert Yang (1):
nativesdk-perl: fix dependecy
.../nativesdk-packagegroup-sdk-host.bb | 3 ++- meta/recipes-devtools/perl/perl_5.14.2.bb | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-)
Signature · 1 line
1.7.5.4
PATCH 1/2 nativesdk-perl: fix dependecy
From: Robert Yang <[email protected]>
perl use variable "PACKAGES" to calculate dependency of perl-modules. It works for target perl-modules package, but doesn't work for nativesdk-perl-modules.
It seems value of "PACKAGES" is cached and doesn't be re-calculate for nativesdk build. The root cause is still searching.
This patch is a work around to add each single nativesdk perl modules to be nativesdk-perl-modules's dependencies.
--- meta/recipes-devtools/perl/perl_5.14.2.bb | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-devtools/perl/perl_5.14.2.bb +2 -2
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \ # We need gnugrep (for -I) DEPENDS = "virtual/db grep-native" DEPENDS += "gdbm zlib" -PR = "r11" +PR = "r12" # 5.10.1 has Module::Build built-in PROVIDES += "libmodule-build-perl"
@@ -294,7 +294,6 @@ FILES_perl-module-unicore += "${libdir}/perl/${PV}/unicore" # packages (actually the non modules packages and not created too) ALLOW_EMPTY_perl-modules = "1" PACKAGES_append = " perl-modules " -RRECOMMENDS_perl-modules = "${@d.getVar('PACKAGES', True).replace('${PN}-modules ', '').replace('${PN}-dbg ', '').replace('${PN}-misc ', '').replace('${PN}-dev ', '').replace('${PN}-pod ', '').replace('${PN}-doc ', '')}" python populate_packages_prepend () { libdir = d.expand('${libdir}/perl/${PV}')
@@ -302,6 +301,7 @@ python populate_packages_prepend () { do_split_packages(d, libdir, 'auto/([^/]*)/.*', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False) do_split_packages(d, libdir, 'Module/([^\/]*).*', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False) do_split_packages(d, libdir, '(^(?!(CPAN\/|CPANPLUS\/|Module\/|unicore\/|auto\/)[^\/]).*)\.(pm|pl|e2x)', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False) + d.setVar("RRECOMMENDS_${PN}-modules", d.getVar('PACKAGES', True).replace('${PN}-modules ', '').replace('${PN}-dbg ', '').replace('${PN}-misc ', '').replace('${PN}-dev ', '').replace('${PN}-pod ', '').replace('${PN}-doc ', '')) } PACKAGES_DYNAMIC = "perl-module-*"
Signature · 1 line
1.7.5.4
Re: [PATCH 1/2] nativesdk-perl: fix dependecy
Hi Richard,
Here are more details for this problem:
RRECOMMENDS_perl-modules = "${@d.getVar('PACKAGES', True)...}"
The PACKAGES would be reset by do_split_packages since:
PACKAGES_DYNAMIC = "perl-module-*" PACKAGES_DYNAMIC_virtclass-nativesdk = "nativesdk-perl-module-*"
Then:
1) The target perl-modules RRECOMMENDS on perl-module-*, this is what we expect.
2) But the nativesdk-perl-modules doesn't RRECOMMENDS on nativesdk-perl-module-*, this is not what we expect.
I have checked the value of PACKAGES after do_split_packages, it has been set correctly (it contains the nativesdk-perl-module-* packages)
But the:
RRECOMMENDS_perl-modules = "${@d.getVar('PACKAGES', True)...}"
doesn't work correctly for nativesdk, the d.getVar('RRECOMMENDS_perl-modules', True) doesn't get the new value of the PACKAGES, it gets the value of PACKAGES before the do_split_packages.
The current patch would fix the problem, but I don't know the root cause, do you have any comments or directions, please?
// Robert
Quoted 47 lines · Kang Kai
From: Robert Yang <[email protected]>
perl use variable "PACKAGES" to calculate dependency of perl-modules. It works for target perl-modules package, but doesn't work for nativesdk-perl-modules.
It seems value of "PACKAGES" is cached and doesn't be re-calculate for nativesdk build. The root cause is still searching.
This patch is a work around to add each single nativesdk perl modules to be nativesdk-perl-modules's dependencies.
Signed-off-by Kang Kai <[email protected]>--- meta/recipes-devtools/perl/perl_5.14.2.bb | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)meta/recipes-devtools/perl/perl_5.14.2.bb +2
-2@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \ # We need gnugrep (for -I) DEPENDS = "virtual/db grep-native" DEPENDS += "gdbm zlib" -PR = "r11" +PR = "r12" # 5.10.1 has Module::Build built-in PROVIDES += "libmodule-build-perl"@@ -294,7 +294,6 @@ FILES_perl-module-unicore += "${libdir}/perl/${PV}/unicore" # packages (actually the non modules packages and not created too) ALLOW_EMPTY_perl-modules = "1" PACKAGES_append = " perl-modules " -RRECOMMENDS_perl-modules = "${@d.getVar('PACKAGES', True).replace('${PN}-modules ', '').replace('${PN}-dbg ', '').replace('${PN}-misc ', '').replace('${PN}-dev ', '').replace('${PN}-pod ', '').replace('${PN}-doc ', '')}" python populate_packages_prepend () { libdir = d.expand('${libdir}/perl/${PV}')@@ -302,6 +301,7 @@ python populate_packages_prepend () { do_split_packages(d, libdir, 'auto/([^/]*)/.*', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False) do_split_packages(d, libdir, 'Module/([^\/]*).*', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False) do_split_packages(d, libdir, '(^(?!(CPAN\/|CPANPLUS\/|Module\/|unicore\/|auto\/)[^\/]).*)\.(pm|pl|e2x)', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False) + d.setVar("RRECOMMENDS_${PN}-modules", d.getVar('PACKAGES', True).replace('${PN}-modules ', '').replace('${PN}-dbg ', '').replace('${PN}-misc ', '').replace('${PN}-dev ', '').replace('${PN}-pod ', '').replace('${PN}-doc ', '')) } PACKAGES_DYNAMIC = "perl-module-*"
Re: [PATCH 1/2] nativesdk-perl: fix dependecy
Quoted 23 lines · Robert Yang
Hi Richard,
Here are more details for this problem:
RRECOMMENDS_perl-modules = "${@d.getVar('PACKAGES', True)...}"
The PACKAGES would be reset by
do_split_packagessince:
PACKAGES_DYNAMIC= "perl-module-*" PACKAGES_DYNAMIC_virtclass-nativesdk = "nativesdk-perl-module-*"Then:
1) The target perl-modules RRECOMMENDS on perl-module-*, this is what we expect.2) But the nativesdk-perl-modules doesn't RRECOMMENDS on nativesdk-perl-module-*, this is not what we expect.
I have checked the value of PACKAGES after
do_split_packages, it has been set correctly (it contains the nativesdk-perl-module-* packages)But the:
Quoted 8 lines
RRECOMMENDS_perl-modules = "${@d.getVar('PACKAGES', True)...}"
doesn't work correctly for nativesdk, the
d.getVar('RRECOMMENDS_perl-modules', True)doesn't get the new value of the PACKAGES, it gets the value of PACKAGES before thedo_split_packages.The current patch would fix the problem, but I don't know the root cause, do you have any comments or directions, please?
The root cause is the way the class extension code works. I think in this case, moving the setting of the RRECOMMENDS_perl-modules to where you set it is the correct thing to do. We need to include this explanation in the patch/commit though.
Cheers,
Richard
PATCH 2/2 nativesdk-packagegroup-sdk-host: add perl modules
In reply to Kang Kainativesdk-perl is required to cross compile iptables when use meta-toolchain-gmae, and perl modules are needed too. Package nativesdk-perl-modules depends on nativesdk-perl, so just add nativesdk-perl-modules only.
[Yocto 3100]
--- .../nativesdk-packagegroup-sdk-host.bb | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb +2 -1
@@ -3,7 +3,7 @@ # SUMMARY = "Host packages for the standalone SDK or external toolchain" -PR = "r11" +PR = "r12" LICENSE = "MIT" inherit nativesdk packagegroup
@@ -20,6 +20,7 @@ RDEPENDS_${PN} = "\ nativesdk-libtool \ nativesdk-autoconf \ nativesdk-automake \ + nativesdk-perl-modules \ " RDEPENDS_${PN}_darwin8 = "\
Signature · 1 line
1.7.5.4
Re: [PATCH 2/2] nativesdk-packagegroup-sdk-host: add perl modules
Quoted 26 lines · Kang Kai
nativesdk-perl is required to cross compile iptables when use meta-toolchain-gmae, and perl modules are needed too. Package nativesdk-perl-modules depends on nativesdk-perl, so just add nativesdk-perl-modules only.
[Yocto 3100]
Signed-off-by Kang Kai <[email protected]>--- .../nativesdk-packagegroup-sdk-host.bb | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb +1
-1@@ -3,7 +3,7 @@ # SUMMARY = "Host packages for the standalone SDK or external toolchain" -PR = "r11" +PR = "r12" LICENSE = "MIT" inherit nativesdk packagegroup
meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb RDEPENDS_${PN} = "\ · line 24
Quoted 5 lines
meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb +1
-0@@ -20,6 +20,7 @@ RDEPENDS_${PN} = "\ nativesdk-libtool \ nativesdk-autoconf \ nativesdk-automake \ + nativesdk-perl-modules \ "
This doesn't feel right. Which tool has the perl dependency and why doesn't that tool depend on (xxx-)perl-modules?
Cheers,
Richard
Re: [PATCH 2/2] nativesdk-packagegroup-sdk-host: add perl modules
Quoted 25 lines · Richard Purdie
Quoted 24 lines · Kang Kai
nativesdk-perl is required to cross compile iptables when use meta-toolchain-gmae, and perl modules are needed too. Package nativesdk-perl-modules depends on nativesdk-perl, so just add nativesdk-perl-modules only.
[Yocto 3100]
Signed-off-by Kang Kai<[email protected]>--- .../nativesdk-packagegroup-sdk-host.bb | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb +1
-1@@ -3,7 +3,7 @@ # SUMMARY = "Host packages for the standalone SDK or external toolchain" -PR = "r11" +PR = "r12" LICENSE = "MIT"
Quoted 9 lines
meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb RDEPENDS_${PN} = "\ · line 24
Quoted 7 lines
meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb +1
-0inherit nativesdk packagegroup@@ -20,6 +20,7 @@ RDEPENDS_${PN} = "\ nativesdk-libtool \ nativesdk-autoconf \ nativesdk-automake \ + nativesdk-perl-modules \ "This doesn't feel right. Which tool has the perl dependency and why doesn't that tool depend on (xxx-)perl-modules?
perl is RDEPENDed by eglibc-mtrace, and nativesdk-eglibc-mtrace is not installed into toolchain.
When use meta-toolchain-gmae to cross iptable, run 'autoreconf' requires nativesdk-perl. But only install nativesdk-perl can't make perl work properly, so install nativesdk-perl-modules as well. And package nativesdk-perl-modules requires nativesdk-perl, so I just write "nativesdk-perl-modules" here.
Regards,
Kai
Quoted 6 lines
Cheers,
Richard
Re: [PATCH 2/2] nativesdk-packagegroup-sdk-host: add perl modules
Quoted 35 lines · Kang Kai
Quoted 25 lines · Richard Purdie
Quoted 24 lines · Kang Kai
nativesdk-perl is required to cross compile iptables when use meta-toolchain-gmae, and perl modules are needed too. Package nativesdk-perl-modules depends on nativesdk-perl, so just add nativesdk-perl-modules only.
[Yocto 3100]
Signed-off-by Kang Kai<[email protected]>--- .../nativesdk-packagegroup-sdk-host.bb | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb +1
-1@@ -3,7 +3,7 @@ # SUMMARY = "Host packages for the standalone SDK or external toolchain" -PR = "r11" +PR = "r12" LICENSE = "MIT"Quoted 9 lines
meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb RDEPENDS_${PN} = "\ · line 24
Quoted 7 lines
meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb +1
-0inherit nativesdk packagegroup@@ -20,6 +20,7 @@ RDEPENDS_${PN} = "\ nativesdk-libtool \ nativesdk-autoconf \ nativesdk-automake \ + nativesdk-perl-modules \ "This doesn't feel right. Which tool has the perl dependency and why doesn't that tool depend on (xxx-)perl-modules?
Quoted 8 lines
perl is RDEPENDed by eglibc-mtrace, and nativesdk-eglibc-mtrace is not installed into toolchain.
When use meta-toolchain-gmae to cross iptable, run 'autoreconf' requires nativesdk-perl. But only install nativesdk-perl
can't make perl work properly, so install nativesdk-perl-modules as well. And package nativesdk-perl-modules requires nativesdk-perl, so I just write "nativesdk-perl-modules" here.
Let me rephrase the question. Why doesn't nativesdk-automake depend on the correct set of perl modules for example?
We need to figure out which pieces have perl dependencies and then add the correct module dependencies to those places.
Cheers,
Richard