summaryrefslogtreecommitdiff
path: root/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/AUTHORS6
-rw-r--r--bitbake/ChangeLog82
-rw-r--r--bitbake/MANIFEST39
-rw-r--r--bitbake/TODO18
-rwxr-xr-xbitbake/bin/bbimage154
-rwxr-xr-xbitbake/bin/bitbake1131
-rwxr-xr-xbitbake/bin/bitdoc540
-rw-r--r--bitbake/classes/base.bbclass79
-rw-r--r--bitbake/conf/bitbake.conf55
-rw-r--r--bitbake/contrib/README1
-rw-r--r--bitbake/contrib/bbdev.sh31
-rw-r--r--bitbake/contrib/vim/syntax/bitbake.vim120
-rw-r--r--bitbake/doc/COPYING.GPL340
-rw-r--r--bitbake/doc/COPYING.MIT17
-rw-r--r--bitbake/doc/manual/Makefile56
-rw-r--r--bitbake/doc/manual/html.css281
-rw-r--r--bitbake/doc/manual/usermanual.xml447
-rw-r--r--bitbake/lib/bb/__init__.py1236
-rw-r--r--bitbake/lib/bb/build.py404
-rw-r--r--bitbake/lib/bb/cache.py306
-rw-r--r--bitbake/lib/bb/data.py518
-rw-r--r--bitbake/lib/bb/data_smart.py265
-rw-r--r--bitbake/lib/bb/event.py266
-rw-r--r--bitbake/lib/bb/fetch/__init__.py224
-rw-r--r--bitbake/lib/bb/fetch/cvs.py196
-rw-r--r--bitbake/lib/bb/fetch/git.py155
-rw-r--r--bitbake/lib/bb/fetch/local.py61
-rw-r--r--bitbake/lib/bb/fetch/ssh.py122
-rw-r--r--bitbake/lib/bb/fetch/svk.py153
-rw-r--r--bitbake/lib/bb/fetch/svn.py169
-rw-r--r--bitbake/lib/bb/fetch/wget.py167
-rw-r--r--bitbake/lib/bb/manifest.py144
-rw-r--r--bitbake/lib/bb/methodpool.py101
-rw-r--r--bitbake/lib/bb/parse/__init__.py73
-rw-r--r--bitbake/lib/bb/parse/parse_c/BBHandler.py113
-rw-r--r--bitbake/lib/bb/parse/parse_c/Makefile36
-rw-r--r--bitbake/lib/bb/parse/parse_c/README.build12
-rw-r--r--bitbake/lib/bb/parse/parse_c/__init__.py28
-rw-r--r--bitbake/lib/bb/parse/parse_c/bitbakec.pyx180
-rw-r--r--bitbake/lib/bb/parse/parse_c/bitbakeparser.cc1159
-rw-r--r--bitbake/lib/bb/parse/parse_c/bitbakeparser.h29
-rw-r--r--bitbake/lib/bb/parse/parse_c/bitbakeparser.y179
-rw-r--r--bitbake/lib/bb/parse/parse_c/bitbakescanner.cc3201
-rw-r--r--bitbake/lib/bb/parse/parse_c/bitbakescanner.l317
-rw-r--r--bitbake/lib/bb/parse/parse_c/lexer.h46
-rw-r--r--bitbake/lib/bb/parse/parse_c/lexerc.h17
-rw-r--r--bitbake/lib/bb/parse/parse_c/python_output.h56
-rw-r--r--bitbake/lib/bb/parse/parse_c/token.h96
-rw-r--r--bitbake/lib/bb/parse/parse_py/BBHandler.py406
-rw-r--r--bitbake/lib/bb/parse/parse_py/ConfHandler.py212
-rw-r--r--bitbake/lib/bb/parse/parse_py/__init__.py32
-rw-r--r--bitbake/lib/bb/shell.py812
-rw-r--r--bitbake/lib/bb/utils.py162
-rwxr-xr-xbitbake/setup.py69
54 files changed, 0 insertions, 15119 deletions
diff --git a/bitbake/AUTHORS b/bitbake/AUTHORS
deleted file mode 100644
index ef119cce22..0000000000
--- a/bitbake/AUTHORS
+++ /dev/null
@@ -1,6 +0,0 @@
-Phil Blundell <pb@handhelds.org>
-Holger Freyther <zecke@handhelds.org>
-Chris Larson <kergoth@handhelds.org>
-Mickey Lauer <mickey@Vanille.de>
-Richard Purdie <rpurdie@rpsys.net>
-Holger Schurig <holgerschurig@gmx.de>
diff --git a/bitbake/ChangeLog b/bitbake/ChangeLog
deleted file mode 100644
index 93cc45aaf4..0000000000
--- a/bitbake/ChangeLog
+++ /dev/null
@@ -1,82 +0,0 @@
-Changes in BitBake 1.4.2:
- - Send logs to oe.pastebin.com instead of pastebin.com
- fixes #856
- - Copy the internal bitbake data before building the
- dependency graph. This fixes nano not having a
- virtual/libc dependency
- - Allow multiple TARBALL_STASH entries
- - Cache, check if the directory exists before changing
- into it
- - git speedup cloning by not doing a checkout
- - allow to have spaces in filenames (.conf, .bb, .bbclass)
-
-Changes in BitBake 1.4.0:
- - Fix to check both RDEPENDS and RDEPENDS_${PN}
- - Fix a RDEPENDS parsing bug in utils:explode_deps()
- - Update git fetcher behaviour to match git changes
- - ASSUME_PROVIDED allowed to include runtime packages
- - git fetcher cleanup and efficency improvements
- - Change the format of the cache
- - Update usermanual to document the Fetchers
- - Major changes to caching with a new strategy
- giving a major performance increase when reparsing
- with few data changes
-
-Changes in BitBake 1.3.3:
- - Create a new Fetcher module to ease the
- development of new Fetchers.
- Issue #438 fixed by rpurdie@openedhand.com
- - Make the Subversion fetcher honor the SRC Date
- (CVSDATE).
- Issue #555 fixed by chris@openedhand.com
- - Expand PREFERRED_PROVIDER properly
- Issue #436 fixed by rprudie@openedhand.com
- - Typo fix for Issue #531 by Philipp Zabel for the
- BitBake Shell
- - Introduce a new special variable SRCDATE as
- a generic naming to replace CVSDATE.
- - Introduce a new keyword 'required'. In contrast
- to 'include' parsing will fail if a to be included
- file can not be found.
- - Remove hardcoding of the STAMP directory. Patch
- courtsey pHilipp Zabel
- - Track the RDEPENDS of each package (rpurdie@openedhand.com)
- - Introduce BUILD_ALL_DEPS to build all RDEPENDS. E.g
- this is used by the OpenEmbedded Meta Packages.
- (rpurdie@openedhand.com).
-
-Changes in BitBake 1.3.2:
- - reintegration of make.py into BitBake
- - bbread is gone, use bitbake -e
- - lots of shell updates and bugfixes
- - Introduction of the .= and =. operator
- - Sort variables, keys and groups in bitdoc
- - Fix regression in the handling of BBCOLLECTIONS
- - Update the bitbake usermanual
-
-Changes in BitBake 1.3.0:
- - add bitbake interactive shell (bitbake -i)
- - refactor bitbake utility in OO style
- - kill default arguments in methods in the bb.data module
- - kill default arguments in methods in the bb.fetch module
- - the http/https/ftp fetcher will fail if the to be
- downloaded file was not found in DL_DIR (this is needed
- to avoid unpacking the sourceforge mirror page)
- - Switch to a cow like data instance for persistent and non
- persisting mode (called data_smart.py)
- - Changed the callback of bb.make.collect_bbfiles to carry
- additional parameters
- - Drastically reduced the amount of needed RAM by not holding
- each data instance in memory when using a cache/persistent
- storage
-
-Changes in BitBake 1.2.1:
- The 1.2.1 release is meant as a intermediate release to lay the
- ground for more radical changes. The most notable changes are:
-
- - Do not hardcode {}, use bb.data.init() instead if you want to
- get a instance of a data class
- - bb.data.init() is a factory and the old bb.data methods are delegates
- - Do not use deepcopy use bb.data.createCopy() instead.
- - Removed default arguments in bb.fetch
-
diff --git a/bitbake/MANIFEST b/bitbake/MANIFEST
deleted file mode 100644
index 144c74c0fe..0000000000
--- a/bitbake/MANIFEST
+++ /dev/null
@@ -1,39 +0,0 @@
-AUTHORS
-ChangeLog
-MANIFEST
-setup.py
-bin/bitdoc
-bin/bbimage
-bin/bitbake
-lib/bb/__init__.py
-lib/bb/build.py
-lib/bb/cache.py
-lib/bb/data.py
-lib/bb/data_smart.py
-lib/bb/event.py
-lib/bb/fetch/bk.py
-lib/bb/fetch/cvs.py
-lib/bb/fetch/git.py
-lib/bb/fetch/__init__.py
-lib/bb/fetch/local.py
-lib/bb/fetch/svk.py
-lib/bb/fetch/svn.py
-lib/bb/fetch/wget.py
-lib/bb/fetch/ssh.py
-lib/bb/manifest.py
-lib/bb/methodpool.py
-lib/bb/parse/__init__.py
-lib/bb/parse/parse_py/BBHandler.py
-lib/bb/parse/parse_py/ConfHandler.py
-lib/bb/parse/parse_py/__init__.py
-lib/bb/shell.py
-lib/bb/utils.py
-doc/COPYING.GPL
-doc/COPYING.MIT
-doc/manual/html.css
-doc/manual/Makefile
-doc/manual/usermanual.xml
-contrib/bbdev.sh
-contrib/vim/syntax/bitbake.vim
-conf/bitbake.conf
-classes/base.bbclass
diff --git a/bitbake/TODO b/bitbake/TODO
deleted file mode 100644
index 511fae4a25..0000000000
--- a/bitbake/TODO
+++ /dev/null
@@ -1,18 +0,0 @@
-On popular request by popular people a list of tasks to-do:
-
- -Kill insecure usage of os.system either by properly escaping
- the strings or a faster replacement not involving /bin/sh
- -Introduce a -p option to automatically hotshot/profile the
- run
- -Cache dependencies separately and invalidate them when any file
- changed.
- -...
-
-
-DONE:
-· -On generating the inter package deps do not parse each file multiply
-· times.
- -We build the lists while parsing the data now
-· (WAS: Do not generate the world dependency tree, only when someone
-· requests it.
-
diff --git a/bitbake/bin/bbimage b/bitbake/bin/bbimage
deleted file mode 100755
index df6caa28ed..0000000000
--- a/bitbake/bin/bbimage
+++ /dev/null
@@ -1,154 +0,0 @@
-#!/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 Chris Larson
-#
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
-# version.
-#
-# 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.
-#
-# 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., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-
-import sys, os
-sys.path.append(os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), 'lib'))
-import bb
-from bb import *
-
-__version__ = 1.0
-type = "jffs2"
-cfg_bb = data.init()
-cfg_oespawn = data.init()
-
-
-def usage():
- print "Usage: bbimage [options ...]"
- print "Creates an image for a target device from a root filesystem,"
- print "obeying configuration parameters from the BitBake"
- print "configuration files, thereby easing handling of deviceisms."
- print ""
- print " %s\t\t%s" % ("-r [arg], --root [arg]", "root directory (default=${IMAGE_ROOTFS})")
- print " %s\t\t%s" % ("-t [arg], --type [arg]", "image type (jffs2[default], cramfs)")
- print " %s\t\t%s" % ("-n [arg], --name [arg]", "image name (override IMAGE_NAME variable)")
- print " %s\t\t%s" % ("-v, --version", "output version information and exit")
- sys.exit(0)
-
-def version():
- print "BitBake Build Tool Core version %s" % bb.__version__
- print "BBImage version %s" % __version__
-
-def emit_bb(d, base_d = {}):
- for v in d.keys():
- if d[v] != base_d[v]:
- data.emit_var(v, d)
-
-def getopthash(l):
- h = {}
- for (opt, val) in l:
- h[opt] = val
- return h
-
-import getopt
-try:
- (opts, args) = getopt.getopt(sys.argv[1:], 'vr:t:e:n:', [ 'version', 'root=', 'type=', 'bbfile=', 'name=' ])
-except getopt.GetoptError:
- usage()
-
-# handle opts
-opthash = getopthash(opts)
-
-if '--version' in opthash or '-v' in opthash:
- version()
- sys.exit(0)
-
-try:
- cfg_bb = parse.handle(os.path.join('conf', 'bitbake.conf'), cfg_bb)
-except IOError:
- fatal("Unable to open bitbake.conf")
-
-# sanity check
-if cfg_bb is None:
- fatal("Unable to open/parse %s" % os.path.join('conf', 'bitbake.conf'))
- usage(1)
-
-rootfs = None
-extra_files = []
-
-if '--root' in opthash:
- rootfs = opthash['--root']
-if '-r' in opthash:
- rootfs = opthash['-r']
-
-if '--type' in opthash:
- type = opthash['--type']
-if '-t' in opthash:
- type = opthash['-t']
-
-if '--bbfile' in opthash:
- extra_files.append(opthash['--bbfile'])
-if '-e' in opthash:
- extra_files.append(opthash['-e'])
-
-for f in extra_files:
- try:
- cfg_bb = parse.handle(f, cfg_bb)
- except IOError:
- print "unable to open %s" % f
-
-if not rootfs:
- rootfs = data.getVar('IMAGE_ROOTFS', cfg_bb, 1)
-
-if not rootfs:
- bb.fatal("IMAGE_ROOTFS not defined")
-
-data.setVar('IMAGE_ROOTFS', rootfs, cfg_bb)
-
-from copy import copy, deepcopy
-localdata = data.createCopy(cfg_bb)
-
-overrides = data.getVar('OVERRIDES', localdata)
-if not overrides:
- bb.fatal("OVERRIDES not defined.")
-data.setVar('OVERRIDES', '%s:%s' % (overrides, type), localdata)
-data.update_data(localdata)
-data.setVar('OVERRIDES', overrides, localdata)
-
-if '-n' in opthash:
- data.setVar('IMAGE_NAME', opthash['-n'], localdata)
-if '--name' in opthash:
- data.setVar('IMAGE_NAME', opthash['--name'], localdata)
-
-topdir = data.getVar('TOPDIR', localdata, 1) or os.getcwd()
-
-cmd = data.getVar('IMAGE_CMD', localdata, 1)
-if not cmd:
- bb.fatal("IMAGE_CMD not defined")
-
-outdir = data.getVar('DEPLOY_DIR_IMAGE', localdata, 1)
-if not outdir:
- bb.fatal('DEPLOY_DIR_IMAGE not defined')
-mkdirhier(outdir)
-
-#depends = data.getVar('IMAGE_DEPENDS', localdata, 1) or ""
-#if depends:
-# bb.note("Spawning bbmake to satisfy dependencies: %s" % depends)
-# ret = os.system('bbmake %s' % depends)
-# if ret != 0:
-# bb.error("executing bbmake to satisfy dependencies")
-
-bb.note("Executing %s" % cmd)
-data.setVar('image_cmd', cmd, localdata)
-data.setVarFlag('image_cmd', 'func', 1, localdata)
-try:
- bb.build.exec_func('image_cmd', localdata)
-except bb.build.FuncFailed:
- sys.exit(1)
-#ret = os.system(cmd)
-#sys.exit(ret)
diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake
deleted file mode 100755
index 7fbe7ed5eb..0000000000
--- a/bitbake/bin/bitbake
+++ /dev/null
@@ -1,1131 +0,0 @@
-#!/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
-#
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
-# version.
-#
-# 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.
-#
-# 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., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-
-import sys, os, getopt, glob, copy, os.path, re, time
-sys.path.insert(0,os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), 'lib'))
-import bb
-from bb import utils, data, parse, debug, event, fatal, cache
-from sets import Set
-import itertools, optparse
-
-parsespin = itertools.cycle( r'|/-\\' )
-bbdebug = 0
-
-__version__ = "1.4.3"
-
-#============================================================================#
-# BBParsingStatus
-#============================================================================#
-class BBParsingStatus:
- """
- The initial idea for this status class is to use the data when it is
- already loaded instead of loading it from various place over and over
- again.
- """
-
- def __init__(self):
- self.providers = {}
- self.rproviders = {}
- self.packages = {}
- self.packages_dynamic = {}
- self.bbfile_priority = {}
- self.bbfile_config_priorities = []
- self.ignored_dependencies = None
- self.possible_world = []
- self.world_target = Set()
- self.pkg_pn = {}
- self.pkg_fn = {}
- self.pkg_pvpr = {}
- self.pkg_dp = {}
- self.pn_provides = {}
- self.all_depends = Set()
- self.build_all = {}
- self.rundeps = {}
- self.runrecs = {}
- self.stamp = {}
-
- def handle_bb_data(self, file_name, bb_cache, cached):
- """
- We will fill the dictionaries with the stuff we
- need for building the tree more fast
- """
-
- pn = bb_cache.getVar('PN', file_name, True)
- pv = bb_cache.getVar('PV', file_name, True)
- pr = bb_cache.getVar('PR', file_name, True)
- dp = int(bb_cache.getVar('DEFAULT_PREFERENCE', file_name, True) or "0")
- provides = Set([pn] + (bb_cache.getVar("PROVIDES", file_name, True) or "").split())
- depends = (bb_cache.getVar("DEPENDS", file_name, True) or "").split()
- packages = (bb_cache.getVar('PACKAGES', file_name, True) or "").split()
- packages_dynamic = (bb_cache.getVar('PACKAGES_DYNAMIC', file_name, True) or "").split()
- rprovides = (bb_cache.getVar("RPROVIDES", file_name, True) or "").split()
-
- # build PackageName to FileName lookup table
- if pn not in self.pkg_pn:
- self.pkg_pn[pn] = []
- self.pkg_pn[pn].append(file_name)
-
- self.build_all[file_name] = int(bb_cache.getVar('BUILD_ALL_DEPS', file_name, True) or "0")
- self.stamp[file_name] = bb_cache.getVar('STAMP', file_name, True)
-
- # build FileName to PackageName lookup table
- self.pkg_fn[file_name] = pn
- self.pkg_pvpr[file_name] = (pv,pr)
- self.pkg_dp[file_name] = dp
-
- # Build forward and reverse provider hashes
- # Forward: virtual -> [filenames]
- # Reverse: PN -> [virtuals]
- if pn not in self.pn_provides:
- self.pn_provides[pn] = Set()
- self.pn_provides[pn] |= provides
-
- for provide in provides:
- if provide not in self.providers:
- self.providers[provide] = []
- self.providers[provide].append(file_name)
-
- for dep in depends:
- self.all_depends.add(dep)
-
- # Build reverse hash for PACKAGES, so runtime dependencies
- # can be be resolved (RDEPENDS, RRECOMMENDS etc.)
- for package in packages:
- if not package in self.packages:
- self.packages[package] = []
- self.packages[package].append(file_name)
- rprovides += (bb_cache.getVar("RPROVIDES_%s" % package, file_name, 1) or "").split()
-
- for package in packages_dynamic:
- if not package in self.packages_dynamic:
- self.packages_dynamic[package] = []
- self.packages_dynamic[package].append(file_name)
-
- for rprovide in rprovides:
- if not rprovide in self.rproviders:
- self.rproviders[rprovide] = []
- self.rproviders[rprovide].append(file_name)
-
- # Build hash of runtime depeneds and rececommends
-
- def add_dep(deplist, deps):
- for dep in deps:
- if not dep in deplist:
- deplist[dep] = ""
-
- if not file_name in self.rundeps:
- self.rundeps[file_name] = {}
- if not file_name in self.runrecs:
- self.runrecs[file_name] = {}
-
- for package in packages + [pn]:
- if not package in self.rundeps[file_name]:
- self.rundeps[file_name][package] = {}
- if not package in self.runrecs[file_name]:
- self.runrecs[file_name][package] = {}
-
- add_dep(self.rundeps[file_name][package], bb.utils.explode_deps(bb_cache.getVar('RDEPENDS', file_name, True) or ""))
- add_dep(self.runrecs[file_name][package], bb.utils.explode_deps(bb_cache.getVar('RRECOMMENDS', file_name, True) or ""))
- add_dep(self.rundeps[file_name][package], bb.utils.explode_deps(bb_cache.getVar("RDEPENDS_%s" % package, file_name, True) or ""))
- add_dep(self.runrecs[file_name][package], bb.utils.explode_deps(bb_cache.getVar("RRECOMMENDS_%s" % package, file_name, True) or ""))
-
- # Collect files we may need for possible world-dep
- # calculations
- if not bb_cache.getVar('BROKEN', file_name, True) and not bb_cache.getVar('EXCLUDE_FROM_WORLD', file_name, True):
- self.possible_world.append(file_name)
-
-
-#============================================================================#
-# BBStatistics
-#============================================================================#
-class BBStatistics:
- """
- Manage build statistics for one run
- """
- def __init__(self ):
- self.attempt = 0
- self.success = 0
- self.fail = 0
- self.deps = 0
-
- def show( self ):
- print "Build statistics:"
- print " Attempted builds: %d" % self.attempt
- if self.fail:
- print " Failed builds: %d" % self.fail
- if self.deps:
- print " Dependencies not satisfied: %d" % self.deps
- if self.fail or self.deps: return 1
- else: return 0
-
-
-#============================================================================#
-# BBOptions
-#============================================================================#
-class BBConfiguration( object ):
- """
- Manages build options and configurations for one run
- """
- def __init__( self, options ):
- for key, val in options.__dict__.items():
- setattr( self, key, val )
-
-#============================================================================#
-# BBCooker
-#============================================================================#
-class BBCooker:
- """
- Manages one bitbake build run
- """
-
- ParsingStatus = BBParsingStatus # make it visible from the shell
- Statistics = BBStatistics # make it visible from the shell
-
- def __init__( self ):
- self.build_cache_fail = []
- self.build_cache = []
- self.rbuild_cache = []
- self.building_list = []
- self.build_path = []
- self.consider_msgs_cache = []
- self.preferred = {}
- self.stats = BBStatistics()
- self.status = None
-
- self.cache = None
- self.bb_cache = None
-
- def tryBuildPackage( self, fn, item, the_data ):
- """Build one package"""
- bb.event.fire(bb.event.PkgStarted(item, the_data))
- try:
- self.stats.attempt += 1
- if self.configuration.force:
- bb.data.setVarFlag('do_%s' % self.configuration.cmd, 'force', 1, the_data)
- if not self.configuration.dry_run:
- bb.build.exec_task('do_%s' % self.configuration.cmd, the_data)
- bb.event.fire(bb.event.PkgSucceeded(item, the_data))
- self.build_cache.append(fn)
- return True
- except bb.build.FuncFailed:
- self.stats.fail += 1
- bb.error("task stack execution failed")
- bb.event.fire(bb.event.PkgFailed(item, the_data))
- self.build_cache_fail.append(fn)
- raise
- except bb.build.EventException, e:
- self.stats.fail += 1
- event = e.args[1]
- bb.error("%s event exception, aborting" % bb.event.getName(event))
- bb.event.fire(bb.event.PkgFailed(item, the_data))
- self.build_cache_fail.append(fn)
- raise
-
- def tryBuild( self, fn, virtual , buildAllDeps , build_depends = []):
- """
- Build a provider and its dependencies.
- build_depends is a list of previous build dependencies (not runtime)
- If build_depends is empty, we're dealing with a runtime depends
- """
-
- the_data = self.bb_cache.loadDataFull(fn, self)
-
- # Only follow all (runtime) dependencies if doing a build
- if not buildAllDeps and self.configuration.cmd is "build":
- buildAllDeps = self.status.build_all[fn]
-
- # Error on build time dependency loops
- if build_depends and build_depends.count(fn) > 1:
- bb.error("%s depends on itself (eventually)" % fn)
- bb.error("upwards chain is: %s" % (" -> ".join(self.build_path)))
- return False
-
- # See if this is a runtime dependency we've already built
- # Or a build dependency being handled in a different build chain
- if fn in self.building_list:
- return self.addRunDeps(fn, virtual , buildAllDeps)
-
- item = self.status.pkg_fn[fn]
-
- self.building_list.append(fn)
-
- pathstr = "%s (%s)" % (item, virtual)
- self.build_path.append(pathstr)
-
- depends_list = (bb.data.getVar('DEPENDS', the_data, True) or "").split()
-
- if self.configuration.verbose:
- bb.note("current path: %s" % (" -> ".join(self.build_path)))
- bb.note("dependencies for %s are: %s" % (item, " ".join(depends_list)))
-
- try:
- failed = False
-
- depcmd = self.configuration.cmd
- bbdepcmd = bb.data.getVarFlag('do_%s' % self.configuration.cmd, 'bbdepcmd', the_data)
- if bbdepcmd is not None:
- if bbdepcmd == "":
- depcmd = None
- else:
- depcmd = bbdepcmd
-
- if depcmd:
- oldcmd = self.configuration.cmd
- self.configuration.cmd = depcmd
-
- for dependency in depends_list:
- if dependency in self.status.ignored_dependencies:
- continue