summaryrefslogtreecommitdiff
path: root/meta/classes
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-04-03 08:10:53 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-03 17:01:09 +0100
commitca36be708e54c0c86535bc8512295c76c48f6cf5 (patch)
tree8c91ce5e310224b57de8106de2c7ce7a5bd5a17e /meta/classes
parent354377789628d96fa589cb5721134f631815cfeb (diff)
downloadopenembedded-core-ca36be708e54c0c86535bc8512295c76c48f6cf5.tar.gz
openembedded-core-ca36be708e54c0c86535bc8512295c76c48f6cf5.tar.bz2
openembedded-core-ca36be708e54c0c86535bc8512295c76c48f6cf5.zip
classes/sstate: avoid traceback when no files have been staged
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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/sstate.bbclass5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 3f4f43d47a..67ddc466ce 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: