aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/buildhistory_analysis.py
AgeCommit message (Collapse)Author
2013-12-03classes/buildhistory: add additional variables to image informationPaul Eggleton
Add PACKAGE_EXCLUDE and NO_RECOMMENDATIONS to the info we track for images, since these can change what ends up in the image. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-18buildhistory_analysis: fix error when comparing image contentsPaul Eggleton
OE-Core commit b7de1eaac9eed559b2d68058f5de67de74a6cb58 added an extra argument to the compare_dict_blobs() function but missed adding the argument to one call to compare two versions of the image-info.txt file. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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-05-10classes/buildhistory: track contents of selected files in imagesPaul Eggleton
Add a BUILDHISTORY_IMAGE_FILES variable specifying a space-separated list of files within an image to copy into buildhistory, so that changes to them can be tracked. Typically this would be used for configuration files, and by default this includes /etc/passwd and /etc/group, but the user is free to extend this list by setting the variable in local.conf. Implements [YOCTO #4154]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-11buildhistory_analysis: handle more R* variablesPaul Eggleton
Report changes to RPROVIDES, RREPLACES, and RCONFLICTS. As RSUGGESTS isn't widely used and isn't of huge concern if it changes, it is not reported by default. Implements [YOCTO #3391]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-06buildhistory_analysis: fix broken list length checksPaul Eggleton
Fix erroneous use of .count instead of len(), which unfortunately is not reported by Python as an error in a numeric comparison. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-03buildhistory_analysis: update to use explode_dep_versions2()Paul Eggleton
Handle where multiple version specifications are present for the same dependency. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-06buildhistory: reduce the numeric delta to 10%Ross Burton
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-06buildhistory: correctly handle reductions of numeric fieldsRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-06buildhistory_analysis: ignore removal of self-dependenciesPaul Eggleton
The recent removal of self-dependencies for dbg/dev packages produced a fair amount of noise, so filter it out since we know this is a reasonable change. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-06buildhistory_analysis: tidy up duplicate split_version functionPaul Eggleton
This function is now provided by bb.utils and since we have now bumped the minimum bitbake version, we can switch to that one instead. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-06classes/buildhistory: record PKG/PKGE/PKGV/PKGRPaul Eggleton
Save PKG (the actual output package name, which is often different due to debian renaming), and PKGE/PKGV/PKGR (which may be manipulated in certain special cases e.g. gitpkgv.bbclass in meta-oe, the external-sourcery-toolchain recipe, etc.) Note that these are only written when they are different from the normal package name in the case of PKG, or PE/PV/PR for the other variables. Also, use PKGE/PKGV/PKGR instead of PE/PV/PR when comparing package versions since these actually represent the version that the package manager sees. Implements [YOCTO #2787]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-06classes/buildhistory: save preinst/postinst/prerm/postrmPaul Eggleton
Write the value of these package script variables into the packageinfo so that any changes to them can be tracked (in separate files since they are multi-line). Inspired by an earlier patch from Andreas Müller <schnitzeltony@googlemail.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30buildhistory_analysis: fix error when version specifier missingPaul Eggleton
Passing None to split_versions() will raise an exception, so check that the version is specified before passing it in. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-21buildhistory_analysis: avoid printing PE/PV/PR more than oncePaul Eggleton
Don't print PE/PV/PR changes as related field changes of related field changes (i.e. only print them once at the top level). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-21buildhistory_analysis: report if all items removed from a listPaul Eggleton
If all items have been removed from a list then state that explicitly. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-21buildhistory_analysis: skip FILELIST changes for dbg packagesPaul Eggleton
Don't report when files are added or removed from dbg packages unless it results in the package being empty. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-21buildhistory_analysis: hide version number increases in dependenciesPaul Eggleton
If an item in RDEPENDS or RRECOMMENDS only increases in its version number then don't report it as a change, since we don't care about it. This significantly reduces the noise after upgrades. 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-03-19buildhistory_analysis: fix duplicate PE/PV/PR in related fieldsPaul Eggleton
Since PE, PV and PR appear in both the recipe history and package history files these were showing up twice when they were added as related fields to monitored changes. Only add them when the path is exactly the same. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2012-02-21buildhistory_analysis: correctly split RDEPENDS/RRECOMMENDSPaul Eggleton
Split RDEPENDS and RRECOMMENDS correctly (which may contain version number specifications after each item). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2012-02-21buildhistory_analysis: avoid noise due to reorderingPaul Eggleton
Avoid noise in the output due to reordering of list variables (except for PACKAGES where we just report that the order changed). Recent changes to the buildhistory class itself will avoid this reordering from occurring but this allows us to examine the results before and after those changes. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2012-01-19buildhistory_analysis: include related fields in outputPaul Eggleton
Sometimes, when a value changes in the buildhistory it is useful to know when a related (but not necessarily itself monitored) value changes as it can help explain the change. For example, when the list of installed packages for an image changes it could be caused by a change to one of the image-related variables. Related field changes are recorded as sub-items of each change. Currently the only way to visualise these is via the buildhistory-diff tool, so an example would be: Changes to images/qemux86/eglibc/core-image-minimal (installed-package-names.txt): locale-base-de-de was added procps was added * IMAGE_LINGUAS: added "de-de" * IMAGE_INSTALL: added "procps" Here we see that two additional packages have been added to the image, and looking at the related changes to the two variables IMAGE_INSTALL and IMAGE_LINGUAS we have the explanation as to why. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-19buildhistory_analysis: improve field handling robustnessPaul Eggleton
Avoid errors when comparing changes for KEY = value files (package info files and image-info.txt): * Handle keys appearing and disappearing - this will help to handle PE in package info files (which is only written when it is not blank) and when we add additional fields in future. * Handle when old value is 0 for numeric field (avoid division by zero) * Report when numeric field was empty or missing rather than 0 (but still treat it as 0 for comparison purposes) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-19buildhistory_analysis: correctly handle whitespace when splitting listsPaul Eggleton
Don't specify any argument to the split() function when handling changes to list type variables (e.g. PACKAGES) so that the values are split by any whitespace and only split once for a block of multiple whitespace characters. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-19buildhistory: record additional image infoPaul Eggleton
Record some additional information about images - the uncompressed size of the final image as well as the values of various variables that may have influenced its contents. This is recorded in a machine-readable "image-info.txt" file similar in structure to the package history files. Also add some code to analyse changes to these values. (Most of the variable values aren't monitored directly but will be used as contextual information when they change at the same time as the content of the image changing.) 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>