]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
populate_sdk_ext.bbclass: don't rename layers when failed
authorRobert Yang <liezhi.yang@windriver.com>
Sun, 15 Oct 2017 19:30:43 +0000 (03:30 +0800)
committerRobert Yang <liezhi.yang@windriver.com>
Wed, 22 Nov 2017 03:02:15 +0000 (11:02 +0800)
commit1dc15549f49d548923960ad388572a44080c7dd8
treee3f5b603ce58b7500892c34489e4af877bc6c628
parentbf3b4029b1269d2adda56216444b1de2196640b7
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.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
meta/classes/populate_sdk_ext.bbclass