2005-08-31 10:47:56 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
# ex:ts=4:sw=4:sts=4:et
|
|
|
|
# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
|
|
|
|
#
|
|
|
|
# Copyright (C) 2003, 2004 Chris Larson
|
|
|
|
# Copyright (C) 2003, 2004 Phil Blundell
|
|
|
|
# Copyright (C) 2003 - 2005 Michael 'Mickey' Lauer
|
|
|
|
# Copyright (C) 2005 Holger Hans Peter Freyther
|
|
|
|
# Copyright (C) 2005 ROAD GmbH
|
2006-11-16 15:02:15 +00:00
|
|
|
# Copyright (C) 2006 Richard Purdie
|
2005-08-31 10:47:56 +00:00
|
|
|
#
|
2007-01-08 23:53:01 +00:00
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License version 2 as
|
|
|
|
# published by the Free Software Foundation.
|
2005-08-31 10:47:56 +00:00
|
|
|
#
|
2007-01-08 23:53:01 +00:00
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
2005-08-31 10:47:56 +00:00
|
|
|
#
|
2007-01-08 23:53:01 +00:00
|
|
|
# You should have received a copy of the GNU General Public License along
|
|
|
|
# with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2005-08-31 10:47:56 +00:00
|
|
|
|
2010-04-15 14:49:54 +00:00
|
|
|
import os
|
2015-03-20 13:13:05 +00:00
|
|
|
import sys
|
|
|
|
|
2010-11-26 17:08:05 +00:00
|
|
|
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)),
|
2010-03-24 23:56:12 +00:00
|
|
|
'lib'))
|
2010-12-02 19:05:51 +00:00
|
|
|
try:
|
|
|
|
import bb
|
2011-06-14 23:44:58 +00:00
|
|
|
except RuntimeError as exc:
|
2010-12-02 19:05:51 +00:00
|
|
|
sys.exit(str(exc))
|
2013-05-28 16:52:02 +00:00
|
|
|
|
2015-03-20 13:13:05 +00:00
|
|
|
from bb import cookerdata
|
2015-04-28 11:27:34 +00:00
|
|
|
from bb.main import bitbake_main, BitBakeConfigParameters, BBMainException
|
2011-06-08 12:12:49 +00:00
|
|
|
|
2016-04-29 06:41:34 +00:00
|
|
|
__version__ = "1.31.0"
|
2015-04-28 12:15:57 +00:00
|
|
|
|
2006-03-20 17:45:11 +00:00
|
|
|
if __name__ == "__main__":
|
2015-04-28 12:15:57 +00:00
|
|
|
if __version__ != bb.__version__:
|
|
|
|
sys.exit("Bitbake core version and program version mismatch!")
|
2010-12-10 15:51:47 +00:00
|
|
|
try:
|
2015-04-28 12:52:18 +00:00
|
|
|
sys.exit(bitbake_main(BitBakeConfigParameters(sys.argv),
|
|
|
|
cookerdata.CookerConfiguration()))
|
2015-04-28 11:27:34 +00:00
|
|
|
except BBMainException as err:
|
2015-04-28 12:52:18 +00:00
|
|
|
sys.exit(err)
|
2013-10-04 13:16:15 +00:00
|
|
|
except bb.BBHandledException:
|
2015-04-28 12:52:18 +00:00
|
|
|
sys.exit(1)
|
2010-12-10 15:51:47 +00:00
|
|
|
except Exception:
|
|
|
|
import traceback
|
2013-04-23 13:43:45 +00:00
|
|
|
traceback.print_exc()
|
2015-04-28 12:52:18 +00:00
|
|
|
sys.exit(1)
|