diff options
author | Ming Liu <ming.liu@windriver.com> | 2013-05-23 15:33:43 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-05-24 14:14:30 +0100 |
commit | 9742e866f545bc0d04aca697b541ed88f4e1764a (patch) | |
tree | 5c92b0171ee2e2d2c7ab58b0c2c2b296456e850f /meta/classes/rm_work.bbclass | |
parent | 9e39d10ec92db23c9765b83559c32c0302bc8c5d (diff) | |
download | openembedded-core-9742e866f545bc0d04aca697b541ed88f4e1764a.tar.gz openembedded-core-9742e866f545bc0d04aca697b541ed88f4e1764a.tar.bz2 openembedded-core-9742e866f545bc0d04aca697b541ed88f4e1764a.zip |
rm_work.bbclass: ignore failure for removing pseudo folder
When building over NFS2/3 server, removal of pseudo folders will fail in
some cases for there are files in it still used by pseudo daemon, thus
cause ".nfsXXXXX" files generated which can't be removed by clients. This
will lead rm_work task fo fail.
These failures could be safely ignored because ".nfsXXXXX" files would be
automatically cleared by NFS server when no clients keep opening them.
[YOCTO #4531]
[ CQID: WIND00412051 ]
Signed-off-by: Ming Liu <ming.liu@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/classes/rm_work.bbclass')
-rw-r--r-- | meta/classes/rm_work.bbclass | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/meta/classes/rm_work.bbclass b/meta/classes/rm_work.bbclass index 1642af7936..f0f6d18249 100644 --- a/meta/classes/rm_work.bbclass +++ b/meta/classes/rm_work.bbclass @@ -30,15 +30,18 @@ do_rm_work () { cd ${WORKDIR} for dir in * do - # Retain only logs and other files in temp. - if [ $dir != 'temp' ]; then + # Retain only logs and other files in temp, safely ignore + # failures of removing pseudo folers on NFS2/3 server. + if [ $dir = 'pseudo' ]; then + rm -rf $dir 2> /dev/null || true + elif [ $dir != 'temp' ]; then rm -rf $dir fi done # Need to add pseudo back or subsqeuent work in this workdir # might fail since setscene may not rerun to recreate it - mkdir ${WORKDIR}/pseudo/ + mkdir -p ${WORKDIR}/pseudo/ # Change normal stamps into setscene stamps as they better reflect the # fact WORKDIR is now empty |