#!/usr/bin/env python3 # Recipe creation tool # # Copyright (C) 2014 Intel Corporation # # 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. import sys import os import argparse import glob import logging scripts_path = os.path.dirname(os.path.realpath(__file__)) lib_path = scripts_path + '/lib' sys.path = sys.path + [lib_path] import scriptutils import argparse_oe logger = scriptutils.logger_create('recipetool') plugins = [] def tinfoil_init(parserecipes): import bb.tinfoil import logging tinfoil = bb.tinfoil.Tinfoil(tracking=True) tinfoil.logger.setLevel(logger.getEffectiveLevel()) tinfoil.prepare(not parserecipes) return tinfoil def main(): if not os.environ.get('BUILDDIR', ''): logger.error("This script can only be run after initialising the build environment (e.g. by using oe-init-build-env)") sys.exit(1) parser = argparse_oe.ArgumentParser(description="OpenEmbedded recipe tool", add_help=False, epilog="Use %(prog)s --help to get help on a specific command") parser.add_argument('-d', '--debug', help='Enable debug output', action='store_true') parser.add_argument('-q', '--quiet', help='Print only errors', action='store_true') parser.add_argument('--color', choices=['auto', 'always', 'never'], default='auto', help='Colorize output (where %(metavar)s is %(choices)s)', metavar='COLOR') global_args, unparsed_args = parser.parse_known_args() # Help is added here rather than via add_help=True, as we don't want it to # be handled by parse_known_args() parser.add_argument('-h', '--help', action='help', default=argparse.SUPPRESS, help='show this help message and exit') subparsers = parser.add_subparsers(title='subcommands', metavar='') subparsers.required = True if global_args.debug: logger.setLevel(logging.DEBUG) elif global_args.quiet: logger.setLevel(logging.ERROR) import scriptpath bitbakepath = scriptpath.add_bitbake_lib_path() if not bitbakepath: logger.error("Unable to find bitbake by searching parent directory of this script or PATH") sys.exit(1) logger.debug('Found bitbake path: %s' % bitbakepath) scriptpath.add_oe_lib_path() scriptutils.logger_setup_color(logger, global_args.color) tinfoil = tinfoil_init(False) try: for path in (tinfoil.config_data.getVar('BBPATH').split(':') + [scripts_path]): pluginpath = os.path.join(path, 'lib', 'recipetool') scriptutils.load_plugins(logger, plugins, pluginpath) registered = False for plugin in plugins: if hasattr(plugin, 'register_commands'): registered = True plugin.register_commands(subparsers) elif hasattr(plugin, 'register_command'): # Legacy function name registered = True plugin.register_command(subparsers) if hasattr(plugin, 'tinfoil_init'): plugin.tinfoil_init(tinfoil) if not registered: logger.error("No commands registered - missing plugins?") sys.exit(1) args = parser.parse_args(unparsed_args, namespace=global_args) try: if getattr(args, 'parserecipes', False): tinfoil.config_data.disableTracking() tinfoil.parseRecipes() tinfoil.config_data.enableTracking() ret = args.func(args) except bb.BBHandledException: ret = 1 finally: tinfoil.shutdown() return ret if __name__ == "__main__": try: ret = main() except Exception: ret = 1 import traceback traceback.print_exc() sys.exit(ret) kages/xorg-xserver/xserver-kdrive_git.bb?id=aa03004ace2fabb135a6208ef8c2d2b312aa7b0b'>[PR] Change PR to FILE_PR and intro PR as FILE_PR + DISTRO_PRHolger Hans Peter Freyther1 Allow a distribution to globally bump the PR of every package this is useful when there was a change in the toolchain and every package is going to be different. find packages/ \( -name '*.bb' -or -name '*.inc' \) -exec sed -i s/"^PR="/"FILE_PR ="/ {} \; find packages/ \( -name '*.bb' -or -name '*.inc' \) -exec sed -i s/"^PR ="/"FILE_PR ="/ {} \; Acked-By: Koen Kooi <koen@openembedded.org> 2008-09-17xserver: make kdrive and xorg parallel installable by putting the security ↵Koen Kooi1 file in a seperate package 2007-09-08xserver-kdrive-git: add build fix for xephyrPhilipp Zabel1 2007-09-08xserver-kdrive-git: small w100 build fixPhilipp Zabel1 2007-09-08xserver-kdrive-git: add enable-epson.patch for gitPhilipp Zabel1 2007-09-08xserver-kdrive-git: drop "--enable-kdrive-vesa" againPhilipp Zabel1 * the vesa server needs sys/vm86.h, which is not staged by arm glibc. 2007-09-08xserver-kdrive-git: fixupPhilipp Zabel1 * convert to use xserver-kdrive-common.inc * make patches apply 2007-08-02xorg-xservers: remove RPROVIDES=virtual/xserver, that should help people ↵Koen Kooi1 seeing kdrive-git being built * and it helps to spot broken tasks/images that RDEPEND/PACKAGE_INSTALL virtual/xserver instead of ${XSERVER} 2007-08-02xorg mega commit: merge in change from pokyKoen Kooi1 2007-03-28xserver-kdrive: remove xcalibrate-1.2 patch, xcalibrate is upstream after allPhilipp Zabel1 2007-03-28xserver-kdrive: change git version to use xserver-kdrive-common.incPhilipp Zabel1 2006-12-31remove extra whitespace at end-of-line in about 900 bb files.Rolf Leggewie1 2006-11-17xserver-kdrive-git: fix parse errorKoen Kooi1 2006-10-19kdrive: remove duplicate packages.Koen Kooi1 * nothing changed in the actual output, so no PR bump needed 2006-10-19xserver-kdrive * disable w100 by default, enable it for armMichael Lauer1 2006-09-23xserver-kdrive git reduce duplicated metadataMichael Lauer1 2006-09-19xserver-kdrive git supply EXTRA_OECONF_x86 since w100 xserver doesn't build ↵Michael Lauer1 for x86 2006-09-02xserver-kdrive: git build fix, better w100 descriptionPhilipp Zabel1 2006-09-02xserver-kdrive: w100 accelerated kdrive for people to play withPhilipp Zabel1 - enable compilation of Xw100 and package it as xserver-kdrive-w100 - thanks to Mardy, RP, sirfred, Spyro and XorA! 2006-08-31xserver-kdrive-git: update and apply disable-xf86-dga-xorgcfg.patchPhilipp Zabel1 2006-08-30xserver-kdrive git: adjust for new calibrate stuff, package Xsdl, enable ↵Koen Kooi1 build of epson server 2006-08-29xserver-kdrive git: remove tslib and xcalibrate patches that have been ↵Koen Kooi1 applied upstream (yay!) and enable tslib in EXTRA_OECONF 2006-08-29xserver-kdrive-git: apply the xcalibrate patch from X11R7.1Philipp Zabel1 2006-08-25xserver-kdrive git: fix packaging so Security Policy ends up in the rootfsKoen Kooi1 2006-08-10xserver-kdrive-git: fix DEPENDSKoen Kooi1 2006-08-03xserver-kdrive git: include SRCDATE in PV, even if it doesn't make sense for ↵Koen Kooi1 git trees 2006-08-03xserver-kdrive git: fix PVKoen Kooi1 2006-07-29x11: change virtual/x11 to virtual/libx11Justin Patrin1 2006-07-26x11: switch to virtual/x11 so that diet or full x11 can be selectedJustin Patrin1 - emacs and synergy need full x11, hence libx11 instead of virtual/x11 - any other packages which depend on a full x11 will need the same change 2006-07-24xorg-*: Massive rename to conform to X11R7.x_a.b.c versioning and xorg-* ↵Raymond Danks1 directory structure. This is the first step for the update to X11R7.1. This will not build and will be followed by more patches and updates.