Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix nativesdk-perl dependency
@ 2012-10-15 11:32 Kang Kai
  2012-10-15 11:32 ` [PATCH 1/2] nativesdk-perl: fix dependecy Kang Kai
  2012-10-15 11:32 ` [PATCH 2/2] nativesdk-packagegroup-sdk-host: add perl modules Kang Kai
  0 siblings, 2 replies; 8+ messages in thread
From: Kang Kai @ 2012-10-15 11:32 UTC (permalink / raw)
  To: openembedded-core

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(-)

-- 
1.7.5.4




^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/2] nativesdk-perl: fix dependecy
  2012-10-15 11:32 [PATCH 0/2] Fix nativesdk-perl dependency Kang Kai
@ 2012-10-15 11:32 ` Kang Kai
  2012-10-16  8:16   ` Robert Yang
  2012-10-15 11:32 ` [PATCH 2/2] nativesdk-packagegroup-sdk-host: add perl modules Kang Kai
  1 sibling, 1 reply; 8+ messages in thread
From: Kang Kai @ 2012-10-15 11:32 UTC (permalink / raw)
  To: openembedded-core

From: Robert Yang <liezhi.yang@windriver.com>

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 <kai.kang@windriver.com>
---
 meta/recipes-devtools/perl/perl_5.14.2.bb |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/perl/perl_5.14.2.bb b/meta/recipes-devtools/perl/perl_5.14.2.bb
index d9206d8..643ec0d 100644
--- a/meta/recipes-devtools/perl/perl_5.14.2.bb
+++ b/meta/recipes-devtools/perl/perl_5.14.2.bb
@@ -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-*"
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] nativesdk-packagegroup-sdk-host: add perl modules
  2012-10-15 11:32 [PATCH 0/2] Fix nativesdk-perl dependency Kang Kai
  2012-10-15 11:32 ` [PATCH 1/2] nativesdk-perl: fix dependecy Kang Kai
@ 2012-10-15 11:32 ` Kang Kai
  2012-10-15 20:55   ` Richard Purdie
  1 sibling, 1 reply; 8+ messages in thread
From: Kang Kai @ 2012-10-15 11:32 UTC (permalink / raw)
  To: openembedded-core

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 <kai.kang@windriver.com>
---
 .../nativesdk-packagegroup-sdk-host.bb             |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb b/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
index 63fea28..383820a 100644
--- a/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
+++ b/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
@@ -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 = "\
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] nativesdk-packagegroup-sdk-host: add perl modules
  2012-10-15 11:32 ` [PATCH 2/2] nativesdk-packagegroup-sdk-host: add perl modules Kang Kai
@ 2012-10-15 20:55   ` Richard Purdie
  2012-10-16  1:59     ` Kang Kai
  0 siblings, 1 reply; 8+ messages in thread
From: Richard Purdie @ 2012-10-15 20:55 UTC (permalink / raw)
  To: Kang Kai; +Cc: openembedded-core

On Mon, 2012-10-15 at 19:32 +0800, Kang Kai wrote:
> 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 <kai.kang@windriver.com>
> ---
>  .../nativesdk-packagegroup-sdk-host.bb             |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb b/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
> index 63fea28..383820a 100644
> --- a/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
> +++ b/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
> @@ -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 \
>      "

This doesn't feel right. Which tool has the perl dependency and why
doesn't that tool depend on (xxx-)perl-modules?

Cheers,

Richard




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] nativesdk-packagegroup-sdk-host: add perl modules
  2012-10-15 20:55   ` Richard Purdie
@ 2012-10-16  1:59     ` Kang Kai
  2012-10-17 16:22       ` Richard Purdie
  0 siblings, 1 reply; 8+ messages in thread
From: Kang Kai @ 2012-10-16  1:59 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

On 2012年10月16日 04:55, Richard Purdie wrote:
> On Mon, 2012-10-15 at 19:32 +0800, Kang Kai wrote:
>> 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<kai.kang@windriver.com>
>> ---
>>   .../nativesdk-packagegroup-sdk-host.bb             |    3 ++-
>>   1 files changed, 2 insertions(+), 1 deletions(-)
>>
>> diff --git a/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb b/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
>> index 63fea28..383820a 100644
>> --- a/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
>> +++ b/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
>> @@ -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 \
>>       "
> 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

>
> Cheers,
>
> Richard
>
>




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] nativesdk-perl: fix dependecy
  2012-10-15 11:32 ` [PATCH 1/2] nativesdk-perl: fix dependecy Kang Kai
@ 2012-10-16  8:16   ` Robert Yang
  2012-10-17 16:20     ` Richard Purdie
  0 siblings, 1 reply; 8+ messages in thread
From: Robert Yang @ 2012-10-16  8:16 UTC (permalink / raw)
  To: Purdie, Richard; +Cc: openembedded-core


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

On 10/15/2012 07:32 PM, Kang Kai wrote:
> From: Robert Yang <liezhi.yang@windriver.com>
>
> 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 <kai.kang@windriver.com>
> ---
>   meta/recipes-devtools/perl/perl_5.14.2.bb |    4 ++--
>   1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-devtools/perl/perl_5.14.2.bb b/meta/recipes-devtools/perl/perl_5.14.2.bb
> index d9206d8..643ec0d 100644
> --- a/meta/recipes-devtools/perl/perl_5.14.2.bb
> +++ b/meta/recipes-devtools/perl/perl_5.14.2.bb
> @@ -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-*"
>



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] nativesdk-perl: fix dependecy
  2012-10-16  8:16   ` Robert Yang
@ 2012-10-17 16:20     ` Richard Purdie
  0 siblings, 0 replies; 8+ messages in thread
From: Richard Purdie @ 2012-10-17 16:20 UTC (permalink / raw)
  To: Robert Yang; +Cc: openembedded-core

On Tue, 2012-10-16 at 16:16 +0800, Robert Yang wrote:
> 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?

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




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] nativesdk-packagegroup-sdk-host: add perl modules
  2012-10-16  1:59     ` Kang Kai
@ 2012-10-17 16:22       ` Richard Purdie
  0 siblings, 0 replies; 8+ messages in thread
From: Richard Purdie @ 2012-10-17 16:22 UTC (permalink / raw)
  To: Kang Kai; +Cc: openembedded-core

On Tue, 2012-10-16 at 09:59 +0800, Kang Kai wrote:
> On 2012年10月16日 04:55, Richard Purdie wrote:
> > On Mon, 2012-10-15 at 19:32 +0800, Kang Kai wrote:
> >> 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<kai.kang@windriver.com>
> >> ---
> >>   .../nativesdk-packagegroup-sdk-host.bb             |    3 ++-
> >>   1 files changed, 2 insertions(+), 1 deletions(-)
> >>
> >> diff --git a/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb b/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
> >> index 63fea28..383820a 100644
> >> --- a/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
> >> +++ b/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
> >> @@ -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 \
> >>       "
> > 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.

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







^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-10-17 16:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-15 11:32 [PATCH 0/2] Fix nativesdk-perl dependency Kang Kai
2012-10-15 11:32 ` [PATCH 1/2] nativesdk-perl: fix dependecy Kang Kai
2012-10-16  8:16   ` Robert Yang
2012-10-17 16:20     ` Richard Purdie
2012-10-15 11:32 ` [PATCH 2/2] nativesdk-packagegroup-sdk-host: add perl modules Kang Kai
2012-10-15 20:55   ` Richard Purdie
2012-10-16  1:59     ` Kang Kai
2012-10-17 16:22       ` Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox