summaryrefslogtreecommitdiffstats
path: root/scripts/lib/devtool/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/devtool/__init__.py')
-rw-r--r--scripts/lib/devtool/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/lib/devtool/__init__.py b/scripts/lib/devtool/__init__.py
index f19d0328f3..88665124d1 100644
--- a/scripts/lib/devtool/__init__.py
+++ b/scripts/lib/devtool/__init__.py
@@ -16,7 +16,7 @@
16# You should have received a copy of the GNU General Public License along 16# You should have received a copy of the GNU General Public License along
17# with this program; if not, write to the Free Software Foundation, Inc., 17# with this program; if not, write to the Free Software Foundation, Inc.,
18# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 19"""Devtool plugins module"""
20 20
21import os 21import os
22import sys 22import sys
@@ -26,6 +26,7 @@ import logging
26logger = logging.getLogger('devtool') 26logger = logging.getLogger('devtool')
27 27
28def exec_build_env_command(init_path, builddir, cmd, watch=False, **options): 28def exec_build_env_command(init_path, builddir, cmd, watch=False, **options):
29 """Run a program in bitbake build context"""
29 import bb 30 import bb
30 if not 'cwd' in options: 31 if not 'cwd' in options:
31 options["cwd"] = builddir 32 options["cwd"] = builddir
@@ -49,6 +50,7 @@ def exec_build_env_command(init_path, builddir, cmd, watch=False, **options):
49 return bb.process.run('%s%s' % (init_prefix, cmd), **options) 50 return bb.process.run('%s%s' % (init_prefix, cmd), **options)
50 51
51def exec_watch(cmd, **options): 52def exec_watch(cmd, **options):
53 """Run program with stdout shown on sys.stdout"""
52 if isinstance(cmd, basestring) and not "shell" in options: 54 if isinstance(cmd, basestring) and not "shell" in options:
53 options["shell"] = True 55 options["shell"] = True
54 56
@@ -68,6 +70,7 @@ def exec_watch(cmd, **options):
68 return buf 70 return buf
69 71
70def setup_tinfoil(): 72def setup_tinfoil():
73 """Initialize tinfoil api from bitbake"""
71 import scriptpath 74 import scriptpath
72 bitbakepath = scriptpath.add_bitbake_lib_path() 75 bitbakepath = scriptpath.add_bitbake_lib_path()
73 if not bitbakepath: 76 if not bitbakepath: