Patchwork perl: fix re-execution of task

login
register
mail settings
Submitter Venkata ramana gollamudi
Date April 13, 2012, 11:46 a.m.
Message ID <36ED13F3654AE54CA763E6821D93A5711043A0F7@szxeml534-mbs.china.huawei.com>
Download mbox | patch
Permalink /patch/25739/
State New
Headers show

Comments

Venkata ramana gollamudi - April 13, 2012, 11:46 a.m.
perl package do_configure is changing "/perl-5.14.2/patches/h2ph-multiarch.diff"
 from link to normal file in the process of correcting the paths.
So when patch task is re-executed after complete package building, giving error.

This path correction is not required for links as the link target file
 will be also be modified individually.
Fix done to ignore the path correction during do_configure,
 if file is a link.

[Yocto #2194]

Signed-off-by: Venkata Ramana Gollamudi <ramana.gollamudi@huawei.com>
---
 meta/recipes-devtools/perl/perl_5.14.2.bb |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
Khem Raj - April 13, 2012, 6:02 p.m.
On Fri, Apr 13, 2012 at 4:46 AM, Venkata ramana gollamudi
<ramana.gollamudi@huawei.com> wrote:
> +               # D2194:Fixing the issue "patch file link is replaced with modified file"
> +               # Ignore if file is a link, as actual file will also get caught during grep

That comment should be corrected to avoid your internal bug tracking information

Patch

diff --git a/meta/recipes-devtools/perl/perl_5.14.2.bb b/meta/recipes-devtools/perl/perl_5.14.2.bb
index 92ca9b8..414aa22 100644
--- a/meta/recipes-devtools/perl/perl_5.14.2.bb
+++ b/meta/recipes-devtools/perl/perl_5.14.2.bb
@@ -164,8 +164,12 @@  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
-            echo Fixing: $foo
-            sed -e "s%/usr/include/%${STAGING_INCDIR}/%g" -i $foo
+		# D2194:Fixing the issue "patch file link is replaced with modified file"
+		# Ignore if file is a link, as actual file will also get caught during grep 
+		if [ ! -h $foo ]; then
+			echo Fixing: $foo
+			sed -e "s%/usr/include/%${STAGING_INCDIR}/%g" -i $foo
+	    	fi
         done
 
         rm -f config