From patchwork Thu Apr 12 13:26:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1/1] :Package perl: Re-execution of do_patch task is giving error. Date: Thu, 12 Apr 2012 13:26:34 -0000 From: Venkata ramana gollamudi X-Patchwork-Id: 25669 Message-Id: <36ED13F3654AE54CA763E6821D93A57110438F36@szxeml534-mbs.china.huawei.com> To: "'openembedded-core@lists.openembedded.org'" <'openembedded-core@lists.openembedded.org'> Cc: Sanil kumar Failure: 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/perl_5.14.2.bb, 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 Defect: As part of defect https://bugzilla.yoctoproject.org/show_bug.cgi?id=2194 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/perl_5.14.2.bb new/meta/recipes-devtools/perl/perl_5.14.2.bb --- prev/meta/recipes-devtools/perl/perl_5.14.2.bb 2012-04-12 11:04:39.921786320 +0530 +++ new/meta/recipes-devtools/perl/perl_5.14.2.bb 2012-04-12 11:38:25.634786078 +0530 @@ -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