Patchwork [1/1] :Package perl: Re-execution of do_patch task is giving error.

mail settings
Submitter Venkata ramana gollamudi
Date April 12, 2012, 1:26 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/25669/
State New
Headers show


Venkata ramana gollamudi - April 12, 2012, 1:26 p.m.
Perl package : Re-execution of do_patch task is giving error.

Error Message:
NOTE: package perl-5.14.2-r4: task do_patch: Started 
ERROR: [Errno 22] Invalid argument: '/home/jxu49/osel/sstate-test/build/tmp/work/i586-poky-linux/perl-5.14.2-r4/perl-5.14.2/patches/h2ph-multiarch.diff' 
ERROR: Function failed: patch_do_patch 
ERROR: Logfile of failure stored in: /home/jxu49/osel/sstate-test/build/tmp/work/i586-poky-linux/perl-5.14.2-r4/temp/log.do_patch.11173 
NOTE: package perl-5.14.2-r4: task do_patch: Failed 
ERROR: Task 1 (/home/jxu49/osel/sstate-test/meta/recipes-devtools/perl/, do_patch) failed with exit code '1' 
NOTE: Tasks Summary: Attempted 10 tasks of which 9 didn't need to be rerun and 1 failed.

Steps to reproduce: 
1> bitbake -c cleansstate perl
2> bitbake perl
3> bitbake -c patch perl -f

	As part of defect

Fix details:
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. This path correction is not required for links as the original file will be any way modified separately.
So when patch tried to be applied again, giving error.
Fix done to ignore the path correction during do_configure, if the file is a link.

Please find the below patch :


diff -Nupr prev/meta/recipes-devtools/perl/ new/meta/recipes-devtools/perl/
--- prev/meta/recipes-devtools/perl/	2012-04-12 11:04:39.921786320 +0530
+++ new/meta/recipes-devtools/perl/	2012-04-12 11:38:25.634786078 +0530
@@ -164,8 +164,12 @@  do_configure() {
         # 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
         rm -f config