public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Ming Liu <ming.liu@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH] rm_work.bbclass: ignore failure for removing pseudo folder
Date: Thu, 23 May 2013 15:33:43 +0800	[thread overview]
Message-ID: <1369294423-19805-1-git-send-email-ming.liu@windriver.com> (raw)

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>
---
 meta/classes/rm_work.bbclass | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/meta/classes/rm_work.bbclass b/meta/classes/rm_work.bbclass
index 1642af7..f0f6d18 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
-- 
1.7.11



                 reply	other threads:[~2013-05-23  7:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1369294423-19805-1-git-send-email-ming.liu@windriver.com \
    --to=ming.liu@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox