Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] Fix perl re-execution issues
@ 2012-04-16 16:43 Paul Eggleton
  2012-04-16 16:43 ` [PATCH 1/1] perl: fix re-execution of patch/configure Paul Eggleton
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Paul Eggleton @ 2012-04-16 16:43 UTC (permalink / raw)
  To: openembedded-core

Fix re-execution issues within perl.

Note: I identified that some references to /usr/include are still not
being substituted before or after this patch - you can see these by
doing "grep -rI '/usr/include' *" in WORKDIR after do_configure(). I do
not know enough about how we build perl to know if these are an issue or
not, thus I left them alone.


The following change since commit 4e1a8ed1ab7e7bd950e511c79ddfe072cb280a6e:

  bitbake.conf: Include abi_version.conf in a early stage (2012-04-16 12:51:50 +0100)

is available in the git repository at:
  git://git.openembedded.org/openembedded-core-contrib paule/perl-reexec
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/perl-reexec

Paul Eggleton (1):
  perl: fix re-execution of patch/configure

 meta/recipes-devtools/perl/perl_5.14.2.bb |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

-- 
1.7.5.4




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

* [PATCH 1/1] perl: fix re-execution of patch/configure
  2012-04-16 16:43 [PATCH 0/1] Fix perl re-execution issues Paul Eggleton
@ 2012-04-16 16:43 ` Paul Eggleton
  2012-04-18 15:48   ` Enrico Scholz
  2012-04-16 16:51 ` [PATCH 0/1] Fix perl re-execution issues Paul Eggleton
  2012-04-17 14:19 ` Saul Wold
  2 siblings, 1 reply; 5+ messages in thread
From: Paul Eggleton @ 2012-04-16 16:43 UTC (permalink / raw)
  To: openembedded-core

The perl recipe's do_configure() does some manual sed replacements over
the entire WORKDIR. Fix the following issues with this:

* Skip patches, which fixes re-execution of do_patch after do_configure
  has run once
* Ensure that the replacement operation does nothing if do_configure is
  re-executed
* Avoid unnecessarily modifying /usr/include paths within documentation
  that will end up being packaged
* Fix a quoting issue in the expression used in the grep command that
  ended up causing files that did not contain .*\.h after /usr/include
  to be matched and modified.

The files modified during do_configure have been compared before and
after this patch to ensure there are no unexpected changes. Some
/usr/include paths that are not within documentation are no longer
being substituted however these are all within comments or scripts for
other Unix operating systems that are not applicable.

[YOCTO #2194]

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/recipes-devtools/perl/perl_5.14.2.bb |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-devtools/perl/perl_5.14.2.bb b/meta/recipes-devtools/perl/perl_5.14.2.bb
index 8f3ad25..ecb2262 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 = "r5"
+PR = "r6"
 
 # 5.10.1 has Module::Build built-in
 PROVIDES += "libmodule-build-perl"
@@ -163,9 +163,9 @@ do_configure() {
 			;;
 	esac
         # These are strewn all over the source tree
-        for foo in `grep -I -m1 \/usr\/include\/.*\\.h ${WORKDIR}/* -r | cut -f 1 -d ":"` ; do
+        for foo in `grep -I --exclude="*.patch" --exclude="*.diff" --exclude="*.pod" --exclude="README*" -m1 "/usr/include/.*\.h" ${WORKDIR}/* -r -l` ${S}/utils/h2xs.PL ; do
             echo Fixing: $foo
-            sed -e "s%/usr/include/%${STAGING_INCDIR}/%g" -i $foo
+            sed -e 's|\([ "^'\''I]\+\)/usr/include/|\1${STAGING_INCDIR}/|g' -i $foo
         done
 
         rm -f config
-- 
1.7.5.4




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

* Re: [PATCH 0/1] Fix perl re-execution issues
  2012-04-16 16:43 [PATCH 0/1] Fix perl re-execution issues Paul Eggleton
  2012-04-16 16:43 ` [PATCH 1/1] perl: fix re-execution of patch/configure Paul Eggleton
@ 2012-04-16 16:51 ` Paul Eggleton
  2012-04-17 14:19 ` Saul Wold
  2 siblings, 0 replies; 5+ messages in thread
From: Paul Eggleton @ 2012-04-16 16:51 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Monday 16 April 2012 17:43:01 Paul Eggleton wrote:
> Fix re-execution issues within perl.
> 
> Note: I identified that some references to /usr/include are still not
> being substituted before or after this patch - you can see these by
> doing "grep -rI '/usr/include' *" 

er, that should be:

grep -rI "'/usr/include'" *

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



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

* Re: [PATCH 0/1] Fix perl re-execution issues
  2012-04-16 16:43 [PATCH 0/1] Fix perl re-execution issues Paul Eggleton
  2012-04-16 16:43 ` [PATCH 1/1] perl: fix re-execution of patch/configure Paul Eggleton
  2012-04-16 16:51 ` [PATCH 0/1] Fix perl re-execution issues Paul Eggleton
@ 2012-04-17 14:19 ` Saul Wold
  2 siblings, 0 replies; 5+ messages in thread
From: Saul Wold @ 2012-04-17 14:19 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Paul Eggleton

On 04/16/2012 09:43 AM, Paul Eggleton wrote:
> Fix re-execution issues within perl.
>
> Note: I identified that some references to /usr/include are still not
> being substituted before or after this patch - you can see these by
> doing "grep -rI '/usr/include' *" in WORKDIR after do_configure(). I do
> not know enough about how we build perl to know if these are an issue or
> not, thus I left them alone.
>
>
> The following change since commit 4e1a8ed1ab7e7bd950e511c79ddfe072cb280a6e:
>
>    bitbake.conf: Include abi_version.conf in a early stage (2012-04-16 12:51:50 +0100)
>
> is available in the git repository at:
>    git://git.openembedded.org/openembedded-core-contrib paule/perl-reexec
>    http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/perl-reexec
>
> Paul Eggleton (1):
>    perl: fix re-execution of patch/configure
>
>   meta/recipes-devtools/perl/perl_5.14.2.bb |    6 +++---
>   1 files changed, 3 insertions(+), 3 deletions(-)
>

Merged into OE-Core

Thanks
	Sau!



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

* Re: [PATCH 1/1] perl: fix re-execution of patch/configure
  2012-04-16 16:43 ` [PATCH 1/1] perl: fix re-execution of patch/configure Paul Eggleton
@ 2012-04-18 15:48   ` Enrico Scholz
  0 siblings, 0 replies; 5+ messages in thread
From: Enrico Scholz @ 2012-04-18 15:48 UTC (permalink / raw)
  To: openembedded-core; +Cc: Paul Eggleton

Paul Eggleton <paul.eggleton-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
writes:

> -        for foo in `grep -I -m1 \/usr\/include\/.*\\.h ${WORKDIR}/* -r | cut -f 1 -d ":"` ; do
> +        for foo in `grep -I --exclude="*.patch" --exclude="*.diff" --exclude="*.pod" --exclude="README*" -m1 "/usr/include/.*\.h" ${WORKDIR}/* -r -l` ${S}/utils/h2xs.PL ; do

It would be much better to replace the 'grep -r' by 'find -type f ... |
xargs grep'.  'grep -r' is very bad because:

* '-r' is not standardized

* it can return symlinks which might point to read-only locations
  (e.g. patches/config.sh* are such links).  'sed -i' on such files
  can make the build fail.


Enrico



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

end of thread, other threads:[~2012-04-18 15:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-16 16:43 [PATCH 0/1] Fix perl re-execution issues Paul Eggleton
2012-04-16 16:43 ` [PATCH 1/1] perl: fix re-execution of patch/configure Paul Eggleton
2012-04-18 15:48   ` Enrico Scholz
2012-04-16 16:51 ` [PATCH 0/1] Fix perl re-execution issues Paul Eggleton
2012-04-17 14:19 ` Saul Wold

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