It's very rare case and only happens when BB_NUMBER_THREADS is a high number and tow patching processes happen to generate the same temp file name(e.g. /tmp/po5gPxpP in the following failure) and are trying to create or open it at the same time: +NOTE: Applying patch 'module_build_man_extensions.diff' (../layers/oe-core/meta/recipes-devtools/perl/perl-5.14.2/debian/module_build_man_extensions.diff) +ERROR: Command Error: exit status: 1 Output: +Applying patch module_build_man_extensions.diff +patching file cpan/Module-Build/lib/Module/Build/Base.pm +patch: **** Can't reopen file /tmp/po5gPxpP : No such file or directory +Patch module_build_man_extensions.diff does not apply (enforce with -f) +ERROR: Command Error: exit status: 1 Output: +Applying patch bash42-009 +patch: **** Can't create file /tmp/po5gPxpP : File exists +Patch bash42-009 does not apply (enforce with -f) +ERROR: Function failed: patch_do_patch +ERROR: Task 626 (/ala-blade291/nxadm/nx/ala-blade29.1/builds-2012-08-31-113750/qemux86_std_bd/layers/oe-core/meta/recipes-devtools/perl/perl_5.14.2.bb, do_patch) failed with exit code '1' +ERROR: Logfile of failure stored in: /ala-blade291/nxadm/nx/ala-blade29.1/builds-2012-08-31-113750/qemux86_std_bd/bitbake_build/tmp/work/i686-wrs-linux/bash-4.2-r4/temp/do_patch/log.do_patch. It is known bug for patch(http://savannah.gnu.org/bugs/?29944) and should be fixed in the version later than the following commit in upstram patch: ----------------------------------------------- commit fdafb60cc0d920fe3f31965013235fbd7fc9d592 Author: Andreas Gruenbacher <agruen@suse.de> Date: Thu Sep 16 13:25:32 2010 +0200 Stop using mktemp() for TMPOUTNAME I can't find out which version it was from that point, but at least the latest 2.6.1 alpha versions in ftp://alpha.gnu.org/gnu/patch/ should fix this. And since there is no patch-native and we use the patch on the host instead, the issue would happen on most host without the above new patch version, so I think it would be a solution for this to uprev patch to the latest version and adding the patch-native.
We must use one TMPDIR per process so that the patching processes don't generate the same temp file name (the "patch" program uses the TMPDIR environment variable for deciding where to create the temp files).