]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
toaster: use current directory if BUILDDIR is not set
authorEd Bartosh <ed.bartosh@linux.intel.com>
Mon, 31 Oct 2016 16:40:37 +0000 (16:40 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 4 Nov 2016 12:50:29 +0000 (12:50 +0000)
commitda631152a0db3f432709a05ff15a268d784ca3ab
treee8d9309c15b1635336d8f350320c703bc0e15566
parente23b574fe52f416184ee43838b8ab28b5b8eb71d
toaster: use current directory if BUILDDIR is not set

If BUILDDIR environment variable is not set signal_runbuilds function
throws TypeError as os.getenv('BUILDDIR') returns None:

ERROR: unsupported operand type(s) for +=: 'NoneType' and 'str'
Traceback (most recent call last):
  File "bitbake/lib/bb/ui/toasterui.py", line
391, in main
    buildinfohelper.update_build_information(event, errors, warnings,
taskfailures)
  File "bitbake/lib/bb/ui/buildinfohelper.py",
line 1184, in update_build_information
    self.internal_state['build'], errors, warnings, taskfailures)
  File "bitbake/lib/bb/ui/buildinfohelper.py",
line 238, in update_build_stats_and_outcome
    signal_runbuilds()
  File "bitbake/lib/toaster/orm/models.py", line
1746, in signal_runbuilds
    '.runbuilds.pid')) as pidf:
  File "/usr/lib64/python3.4/posixpath.py", line 82, in join
    path += b
TypeError: unsupported operand type(s) for +=: 'NoneType' and 'str'

Used os.getenv('BUILDIR', '.') to make it always return meaningful
directory path. Current directory '.' will be used if BUILDDIR is
not set.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/toaster/orm/models.py