summaryrefslogtreecommitdiffstats
path: root/meta/classes/populate_sdk_ext.bbclass
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2017-10-16 03:30:43 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-01-06 22:32:22 +0000
commiteaad759ac8a432ac41f72ff3bef8d31abfa18dfa (patch)
treef02920f02baa6f4a7e7d72d3372ee0b385015517 /meta/classes/populate_sdk_ext.bbclass
parentb27342d23325796fdc69488cd7517fd51195cac2 (diff)
downloadpoky-eaad759ac8a432ac41f72ff3bef8d31abfa18dfa.tar.gz
populate_sdk_ext.bbclass: don't rename layers when failed
The previous code: os.rename(sdkbasepath, temp_sdkbasepath) try: foo finally: os.rename(temp_sdkbasepath, sdkbasepath) always renamed the path, it made the debug harder when error happened. drop the "try: finally" makes the debug easier. (From OE-Core rev: 32126512349d65f0dbc31196c4ec6e1a1147cf5e) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/populate_sdk_ext.bbclass')
-rw-r--r--meta/classes/populate_sdk_ext.bbclass20
1 files changed, 9 insertions, 11 deletions
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
index fce9968ba6..eabc365300 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -162,18 +162,16 @@ def create_filtered_tasklist(d, sdkbasepath, tasklistfile, conf_initpath):
162 except FileNotFoundError: 162 except FileNotFoundError:
163 pass 163 pass
164 os.rename(sdkbasepath, temp_sdkbasepath) 164 os.rename(sdkbasepath, temp_sdkbasepath)
165 cmdprefix = '. %s .; ' % conf_initpath
166 logfile = d.getVar('WORKDIR') + '/tasklist_bb_log.txt'
165 try: 167 try:
166 cmdprefix = '. %s .; ' % conf_initpath 168 oe.copy_buildsystem.check_sstate_task_list(d, get_sdk_install_targets(d), tasklistfile, cmdprefix=cmdprefix, cwd=temp_sdkbasepath, logfile=logfile)
167 logfile = d.getVar('WORKDIR') + '/tasklist_bb_log.txt' 169 except bb.process.ExecutionError as e:
168 try: 170 msg = 'Failed to generate filtered task list for extensible SDK:\n%s' % e.stdout.rstrip()
169 oe.copy_buildsystem.check_sstate_task_list(d, get_sdk_install_targets(d), tasklistfile, cmdprefix=cmdprefix, cwd=temp_sdkbasepath, logfile=logfile) 171 if 'attempted to execute unexpectedly and should have been setscened' in e.stdout:
170 except bb.process.ExecutionError as e: 172 msg += '\n----------\n\nNOTE: "attempted to execute unexpectedly and should have been setscened" errors indicate this may be caused by missing sstate artifacts that were likely produced in earlier builds, but have been subsequently deleted for some reason.\n'
171 msg = 'Failed to generate filtered task list for extensible SDK:\n%s' % e.stdout.rstrip() 173 bb.fatal(msg)
172 if 'attempted to execute unexpectedly and should have been setscened' in e.stdout: 174 os.rename(temp_sdkbasepath, sdkbasepath)
173 msg += '\n----------\n\nNOTE: "attempted to execute unexpectedly and should have been setscened" errors indicate this may be caused by missing sstate artifacts that were likely produced in earlier builds, but have been subsequently deleted for some reason.\n'
174 bb.fatal(msg)
175 finally:
176 os.rename(temp_sdkbasepath, sdkbasepath)
177 # Clean out residue of running bitbake, which check_sstate_task_list() 175 # Clean out residue of running bitbake, which check_sstate_task_list()
178 # will effectively do 176 # will effectively do
179 clean_esdk_builddir(d, sdkbasepath) 177 clean_esdk_builddir(d, sdkbasepath)