summaryrefslogtreecommitdiffstats
path: root/scripts/buildhistory-diff
AgeCommit message (Collapse)Author
2022-01-04scripts/buildhistory-diff: drop use of distutilsTim Orling
The use of distutils.version.LooseVersion to check for GitPython > 0.3.1 is not really needed anymore since any supported distribution has at least 1.0.0 (centos-7 via epel7, debian-9, ubuntu-16.04) If we want to reinstate this check, alternatives would be to require python3-packaging on all hosts and use packaging.version.Version or use an imported LooseVersion in bb.version. [YOCTO #14610] Signed-off-by: Tim Orling <timothy.t.orling@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-16buildhistory-diff: use BUILDDIR to know where buildhistory isRoss Burton
Instead of assuming that the buildhistory is stored in ./buildhistory unless told otherwise, use the environment variable BUILDDIR if present (which is set by oe-init-build-env) to locate the buildhistory directory. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-09meta/lib+scripts: Convert to SPDX license headersRichard Purdie
This adds SPDX license headers in place of the wide assortment of things currently in our script headers. We default to GPL-2.0-only except for the oeqa code where it was clearly submitted and marked as MIT on the most part or some scripts which had the "or later" GPL versioning. The patch also drops other obsolete bits of file headers where they were encoountered such as editor modelines, obsolete maintainer information or the phrase "All rights reserved" which is now obsolete and not required in copyright headers (in this case its actually confusing for licensing as all rights were not reserved). More work is needed for OE-Core but this takes care of the bulk of the scripts and meta/lib directories. The top level LICENSE files are tweaked to match the new structure and the SPDX naming. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-02-24buildhistory-diff: honour report_all flagAnuj Mittal
Make sure that we're passing a bool value. Without this, buildhistory shows all the output for all the keys/fields when it shouldn't be by default. Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-18buildhistory-diff: add support for colourising the outputRoss Burton
Colour value removes in red and additions in green, making it easier to scan the output for relevant changes. This adds a --colour option to specify whether colouring should be on, off, or detected. The default is detected, and depends on whether stdout is a TTY (same behaviour as git). Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11scripts/buildhistory-diff: use of argparse instead of optparseDaniela Plascencia
Optparse is deprecated since version 2.7 and won't be developed further. Argparse should be used instead as it provides better tools for parsing and handling arguments. [YOCTO #9635] Signed-off-by: Daniela Plascencia <daniela.plascencia@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-06-23buildhistory-diff: exclude paths from the outputEd Bartosh
Implemented -e/--exclude-path command line option to exclude paths from buildhistory-diff output. [YOCTO #11459] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-04-11buildhistory-diff: add option to compare actual signature differencesPaul Eggleton
Use the code underpinning bitbake-diffsigs to add an option to buildhistory-diff to determine and display the differences between the actual signature inputs, with a twist - we collapse identical changes across different tasks, showing only the most recent task to have that difference, meaning that there's less noise to wade through when you just want to know what changed in order to cause some rebuilding you're seeing. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-11buildhistory-diff: add option to compare task signature listPaul Eggleton
Having added writing out of the task signature list to buildhistory (when BUILDHISTORY_FEATURES includes "task"), we now need a way to compare the list. This just shows which tasks have been added / changed signature / removed. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-11buildhistory-diff: operate from buildhistory directoryPaul Eggleton
If the cwd is named "buildhistory" and the user hasn't specified an alternative path on the command line, then assume that the current directory is the buildhistory directory. This makes it easier to run buildhistory-diff and also interact with the buildhistory git repository as you no longer have to jump into the buildhistory directory and up to the parent again when doing so. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-12buildhistory-diff: suggest correct version of PythonGitEd Bartosh
If buildhistory-diff can't import git module it throws error message suggesting to install it. Due to the move to Python 3 the suggested package name and version became outdated. Changed package name to python3-git and version to >= 0.3.4 as GitPython supports Python 3 starting from 0.3.4. [YOCTO #9741] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-06-02scripts: use python3 in shebangEd Bartosh
As most of oe-test cases work for devtool and recipetool it makes sense to switch both tools to python 3 by explicitly referring to python3 in their shebangs. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2014-06-25scripts: consolidate code to find bitbake pathPaul Eggleton
Several of these scripts were using duplicated code (and slightly different methods) to find the path to bitbake and add its lib subdirectory to the Python import path. Add some common code to do this and change the scripts to use it. Fixes [YOCTO #5076]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-10-26buildhistory-diff: add ability to report version changesPaul Eggleton
Add a -v/--report-ver option to report changes in PKGE/PKGV/PKGR even if the value is the same as the default from PE/PV/PR. Also add a -a/--report-all option to report all changes instead of just the default significant ones. Addresses [YOCTO #5263]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-16buildhistory-diff: improve command-line handlingPaul Eggleton
Improve command-line argument handling of buildhistory-diff to make it easier to use. * Default buildhistory directory to buildhistory/ under the current directory and require an option to set it (since most users will likely run buildhistory-diff from the build directory and keep BUILDHISTORY_DIR at its default location) * Default from-revision to "build-minus-1" to get the difference from the previous build with no arguments * Allow from/to revisions to be specified by from..to (since git accepts this form). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-10buildhistory-diff: improve bad command-line argument handlingPaul Eggleton
* Check for existence of specified buildhistory directory and show a proper error message if it doesn't * Show an error message instead of a traceback with a mangled revision if one of the specified git revisions is invalid * Show usage information if --help is specified * Write error messages to stderr Fixes [YOCTO #4313]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-09buildhistory-diff: prepend to sys.pathChristopher Larson
This ensures that regardless of what else is in our search path, we always use the bitbake corresponding to the running buildhistory-diff command. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30scripts/buildhistory-diff: add GitPython version checkPaul Eggleton
Display an error if the user does not have at least version 0.3.1 of GitPython installed. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-21buildhistory_analysis: use bb.utils.explode_dep_versionsPaul Eggleton
Previously this had its own implementation of splitting a list of packages with optional version e.g. "libncurses-dev (>= 5.9)"; switch to using the already existing bitbake function which does this as it is much better tested. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-06buildhistory: add script to check for significant changesPaul Eggleton
Adds a buildhistory-diff script which can be used to analyse changes in the buildhistory git repository (as produced by buildhistory.bbclass), and report significant ones that may need manual checking to ensure they aren't regressions (e.g. package size changed by more than a certain percentage, files added/removed/changed in the image, etc.) The implementation is actually split into a small script and a Python module, in order to make the logic re-usable in a future web-based interface. Implements the first part of [YOCTO #1566]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>