Patchwork cpan.bbclass: Fix config error while patches to Makefile.PL

login
register
mail settings
Submitter xin.ouyang@windriver.com
Date May 31, 2012, 7:46 a.m.
Message ID <1338450372-6802-1-git-send-email-xin.ouyang@windriver.com>
Download mbox | patch
Permalink /patch/29013/
State Accepted
Commit 7c99105d70a16aa9e42429224abed28743e627b2
Headers show

Comments

xin.ouyang@windriver.com - May 31, 2012, 7:46 a.m.
From: Xin Ouyang <Xin.Ouyang@windriver.com>

If there is a patch to Makefile.PL, a Makefile.PL but no Makefile
will be placed in ${B}/.pc/xxx.patch/ after do_patch. 
And no Makefile will be generated for *this* Makefile.PL.
While do_configure, the original code tries to sed Makefiles
matching with each Makefile.PL in {B}, so this would fail.

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
---
 meta/classes/cpan.bbclass |    1 +
 1 file changed, 1 insertion(+)
Elizabeth Flanagan - June 11, 2012, 5:54 p.m.
On Thu, May 31, 2012 at 12:46 AM,  <xin.ouyang@windriver.com> wrote:
> From: Xin Ouyang <Xin.Ouyang@windriver.com>
>
> If there is a patch to Makefile.PL, a Makefile.PL but no Makefile
> will be placed in ${B}/.pc/xxx.patch/ after do_patch.
> And no Makefile will be generated for *this* Makefile.PL.
> While do_configure, the original code tries to sed Makefiles
> matching with each Makefile.PL in {B}, so this would fail.
>
> Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
> ---
>  meta/classes/cpan.bbclass |    1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/meta/classes/cpan.bbclass b/meta/classes/cpan.bbclass
> index 587e688..2e9432c 100644
> --- a/meta/classes/cpan.bbclass
> +++ b/meta/classes/cpan.bbclass
> @@ -23,6 +23,7 @@ cpan_do_configure () {
>                # Use find since there can be a Makefile generated for each Makefile.PL
>                for f in `find -name Makefile.PL`; do
>                        f2=`echo $f | sed -e 's/.PL//'`
> +                       test -f $f2 || continue
>                        sed -i -e "s:\(PERL_ARCHLIB = \).*:\1${PERL_ARCHLIB}:" \
>                                -e 's/perl.real/perl/' \
>                                $f2
> --
> 1.7.9.5
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


Merged into OE-Core

Thanks

-b

Patch

diff --git a/meta/classes/cpan.bbclass b/meta/classes/cpan.bbclass
index 587e688..2e9432c 100644
--- a/meta/classes/cpan.bbclass
+++ b/meta/classes/cpan.bbclass
@@ -23,6 +23,7 @@  cpan_do_configure () {
 		# Use find since there can be a Makefile generated for each Makefile.PL
 		for f in `find -name Makefile.PL`; do
 			f2=`echo $f | sed -e 's/.PL//'`
+			test -f $f2 || continue
 			sed -i -e "s:\(PERL_ARCHLIB = \).*:\1${PERL_ARCHLIB}:" \
 				-e 's/perl.real/perl/' \
 				$f2