update_layer: fix tinfoil shutdown check to work for fido branch

The fido branch of OE-Core expects BitBake 1.26.x. Unfortunately that
version had a commit backported which introduced a non-working
tinfoil.shutdown() method, so we can't simply rely on its presence to
determine whether or not it should be called. Use a check on the BitBake
version number instead.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
Paul Eggleton 2017-01-18 11:18:09 +13:00
parent fd5111a2ac
commit 19a559cfa6

View File

@ -705,7 +705,7 @@ def main():
import traceback import traceback
traceback.print_exc() traceback.print_exc()
finally: finally:
if hasattr(tinfoil, 'shutdown'): if LooseVersion(bb.__version__) > LooseVersion("1.27"):
tinfoil.shutdown() tinfoil.shutdown()
shutil.rmtree(tempdir) shutil.rmtree(tempdir)