#!/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 # Copyright (C) 2006 - 2007 Richard Purdie # # 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. # # 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., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. from __future__ import print_function import sys, os, glob, os.path, re, time import atexit import itertools import logging import multiprocessing import sre_constants import threading from cStringIO import StringIO from contextlib import closing import bb from bb import utils, data, parse, event, cache, providers, taskdata, command, runqueue logger = logging.getLogger("BitBake") collectlog = logging.getLogger("BitBake.Collection") buildlog = logging.getLogger("BitBake.Build") parselog = logging.getLogger("BitBake.Parsing") providerlog = logging.getLogger("BitBake.Provider") class MultipleMatches(Exception): """ Exception raised when multiple file matches are found """ class NothingToBuild(Exception): """ Exception raised when there is nothing to build """ class state: initial, parsing, running, shutdown, stop = range(5) #============================================================================# # BBCooker #============================================================================# class BBCooker: """ Manages one bitbake build run """ def __init__(self, configuration, server_registration_cb): self.status = None self.appendlist = {} self.server_registration_cb = server_registration_cb self.configuration = configuration self.configuration.data = bb.data.init() bb.data.inheritFromOS(self.configuration.data) self.parseConfigurationFiles(self.configuration.file) if not self.configuration.cmd: self.configuration.cmd = bb.data.getVar("BB_DEFAULT_TASK", self.configuration.data, True) or "build" bbpkgs = bb.data.getVar('BBPKGS', self.configuration.data, True) if bbpkgs and len(self.configuration.pkgs_to_build) == 0: self.configuration.pkgs_to_build.extend(bbpkgs.split()) self.parseCommandLine() # # Special updated configuration we use for firing events # self.configuration.event_data = bb.data.createCopy(self.configuration.data) bb.data.update_data(self.configuration.event_data) # TOSTOP must not be set or our children will hang when they output fd = sys.stdout.fileno() if os.isatty(fd): import termios tcattr = termios.tcgetattr(fd) if tcattr[3] & termios.TOSTOP: buildlog.info("The terminal had the TOSTOP bit set, clearing...") tcattr[3] = tcattr[3] & ~termios.TOSTOP termios.tcsetattr(fd, termios.TCSANOW, tcattr) self.command = bb.command.Command(self) self.state = state.initial self.parser = None def parseConfiguration(self): # Change nice level if we're as2012-07-17libfm: fix build with automake 1.12.xNitin A Kamble 2012-05-25libfm: fix build with automake 1.12Nitin A Kamble 2012-02-24libfm: Fix packaging and dependency issuesRichard Purdie 2012-02-21recipes: bump PR to rebuild .la files without libz.laMartin Jansa 2012-02-10zlib: Upgrade 1.2.5 -> 1.2.6Khem Raj 2011-12-02libfm: Upgrade to 0.1.17Zhai Edwin 2011-10-14libfm: Upgrade to 0.1.16Zhai Edwin 2011-08-04libfm: depend on intltool-native instead of intltoolMartin Jansa 2011-05-17Upstream-Status: Update patch upstream-status for libfm, eggdbus, screenshot...Zhai Edwin 2011-04-28libfm: Remove the flag of G_DISABLE_DEPRECATEDDongxiao Xu 2011-02-01libfm: remove add_missing.patch as part of glib-2.0 downgradeSaul Wold 2010-12-09SRC_URI Checksums AdditionalsSaul Wold 2010-11-22libfm: rename patch directory for package updateSaul Wold 2010-11-22libfm: Update to 0.1.14Zhai Edwin 2010-11-18libfm: add missing definitions and declarationsDongxiao Xu 2010-09-01packages: Separate out most of the remaining packages into recipesRichard Purdie