summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-10-31 16:40:37 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-11-04 12:50:55 +0000
commit98ac0b0a5b04cea8971a07f5ff9a2d711c95d6df (patch)
tree8178f96f80a26ea37aa80ec9847fae5f4eef7b70 /bitbake/lib/toaster
parent637c93edfa0bf91467dedad8f014ca89e0e1fa0e (diff)
downloadpoky-98ac0b0a5b04cea8971a07f5ff9a2d711c95d6df.tar.gz
bitbake: 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. (Bitbake rev: da631152a0db3f432709a05ff15a268d784ca3ab) 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>
Diffstat (limited to 'bitbake/lib/toaster')
-rw-r--r--bitbake/lib/toaster/orm/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index 9a4db1e856..4f8510c4ec 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -1742,7 +1742,7 @@ def invalidate_cache(**kwargs):
1742def signal_runbuilds(): 1742def signal_runbuilds():
1743 """Send SIGUSR1 to runbuilds process""" 1743 """Send SIGUSR1 to runbuilds process"""
1744 try: 1744 try:
1745 with open(os.path.join(os.getenv('BUILDDIR'), 1745 with open(os.path.join(os.getenv('BUILDDIR', '.'),
1746 '.runbuilds.pid')) as pidf: 1746 '.runbuilds.pid')) as pidf:
1747 os.kill(int(pidf.read()), SIGUSR1) 1747 os.kill(int(pidf.read()), SIGUSR1)
1748 except FileNotFoundError: 1748 except FileNotFoundError: