From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] classes/sstate: avoid traceback when no files have been staged
Date: Wed, 3 Apr 2013 08:10:53 +0100 [thread overview]
Message-ID: <1364973053-28019-1-git-send-email-paul.eggleton@linux.intel.com> (raw)
If no files have been staged we want to continue without error instead
of showing a traceback.
Fixes [YOCTO #4056].
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
meta/classes/sstate.bbclass | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 3f4f43d..67ddc46 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -197,7 +197,8 @@ def sstate_install(ss, d):
# Run the actual file install
for state in ss['dirs']:
- oe.path.copytree(state[1], state[2])
+ if os.path.exists(state[1]):
+ oe.path.copytree(state[1], state[2])
for postinst in (d.getVar('SSTATEPOSTINSTFUNCS', True) or '').split():
bb.build.exec_func(postinst, d)
@@ -448,6 +449,8 @@ def sstate_package(ss, d):
bb.mkdirhier(sstatebuild)
bb.mkdirhier(os.path.dirname(sstatepkg))
for state in ss['dirs']:
+ if not os.path.exists(state[1]):
+ continue
srcbase = state[0].rstrip("/").rsplit('/', 1)[0]
for walkroot, dirs, files in os.walk(state[1]):
for file in files:
--
1.7.10.4
reply other threads:[~2013-04-03 7:28 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=1364973053-28019-1-git-send-email-paul.eggleton@linux.intel.com \
--to=paul.eggleton@linux.intel.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