summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cookerdata.py
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-03-20 15:13:05 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-03-25 12:39:50 +0000
commit4e186596338af52bf720dcbbdd3a07b722cf9575 (patch)
treec33f0531fb59f5a7ed34adf0e4b82edbab4b7f6f /bitbake/lib/bb/cookerdata.py
parentf2ca8bc297007e410e9803e915d321b1ba445760 (diff)
downloadopenembedded-core-contrib-4e186596338af52bf720dcbbdd3a07b722cf9575.tar.gz
bitbake: bin/bitbake: Create bitbake_main API
Moved most of functionality of bin/bitbake to lib/bb/main.py to be able to call bitbake from python code. (Bitbake rev: d377f7f88d73f4e5d2dffef03d6acee809827ac6) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cookerdata.py')
-rw-r--r--bitbake/lib/bb/cookerdata.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py
index 7eae761d59..6c11a60e0f 100644
--- a/bitbake/lib/bb/cookerdata.py
+++ b/bitbake/lib/bb/cookerdata.py
@@ -33,8 +33,8 @@ logger = logging.getLogger("BitBake")
parselog = logging.getLogger("BitBake.Parsing")
class ConfigParameters(object):
- def __init__(self):
- self.options, targets = self.parseCommandLine()
+ def __init__(self, argv=sys.argv):
+ self.options, targets = self.parseCommandLine(argv)
self.environment = self.parseEnvironment()
self.options.pkgs_to_build = targets or []
@@ -46,7 +46,7 @@ class ConfigParameters(object):
for key, val in self.options.__dict__.items():
setattr(self, key, val)
- def parseCommandLine(self):
+ def parseCommandLine(self, argv=sys.argv):
raise Exception("Caller must implement commandline option parsing")
def parseEnvironment(self):