summaryrefslogtreecommitdiffstats
path: root/meta
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:13 +0100
commitc7f52855f97716284de0e1a279ef121d51766d08 (patch)
treee58fdf1ae0874e592aebea87a9e554cb88e82a1d /meta
parent6c22c591374d258228f74814cded34a24b4bf2d3 (diff)
downloadpoky-c7f52855f97716284de0e1a279ef121d51766d08.tar.gz
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]. (From OE-Core rev: ca36be708e54c0c86535bc8512295c76c48f6cf5) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-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):
197 197
198 # Run the actual file install 198 # Run the actual file install
199 for state in ss['dirs']: 199 for state in ss['dirs']:
200 oe.path.copytree(state[1], state[2]) 200 if os.path.exists(state[1]):
201 oe.path.copytree(state[1], state[2])
201 202
202 for postinst in (d.getVar('SSTATEPOSTINSTFUNCS', True) or '').split(): 203 for postinst in (d.getVar('SSTATEPOSTINSTFUNCS', True) or '').split():
203 bb.build.exec_func(postinst, d) 204 bb.build.exec_func(postinst, d)
@@ -448,6 +449,8 @@ def sstate_package(ss, d):
448 bb.mkdirhier(sstatebuild) 449 bb.mkdirhier(sstatebuild)
449 bb.mkdirhier(os.path.dirname(sstatepkg)) 450 bb.mkdirhier(os.path.dirname(sstatepkg))
450 for state in ss['dirs']: 451 for state in ss['dirs']:
452 if not os.path.exists(state[1]):
453 continue
451 srcbase = state[0].rstrip("/").rsplit('/', 1)[0] 454 srcbase = state[0].rstrip("/").rsplit('/', 1)[0]
452 for walkroot, dirs, files in os.walk(state[1]): 455 for walkroot, dirs, files in os.walk(state[1]):
453 for file in files: 456 for file in files: