summaryrefslogtreecommitdiffstats
path: root/meta/classes/buildhistory.bbclass
AgeCommit message (Collapse)Author
2021-04-19buildhistory: add missing vardepsexcludesChristopher Larson
For POPULATE_SDK_POST_TARGET_COMMAND, POPULATE_SDK_POST_HOST_COMMAND, and SDK_POSTPROCESS_COMMAND, the appropriate entries were added to vardepvalueexclude, but we want them in vardepsexclude as well. (From OE-Core rev: 2b7d4a7a1deb6c2565410a65be0368f6e8bb3efb) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 554b17e0bbe5190e4b03121f2ed06f4845012a71) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-05buildhistory.bbclass: avoid exception for empty BUILDHISTORY_FEATURES variablePeter Bergin
An exception is fired when a BuildStarted event is sent to buildhistory bbclass and the variable BUILDHISTORY_FEATURES is not set. ERROR: Execution of event handler 'buildhistory_eventhandler' failed Traceback (most recent call last): File "<...>/meta/classes/buildhistory.bbclass", line 862, in buildhistory_eventhandler(e=<bb.event.BuildStarted object at 0x7f94c3810250>): python buildhistory_eventhandler() { > if e.data.getVar('BUILDHISTORY_FEATURES').strip(): reset = e.data.getVar("BUILDHISTORY_RESET") AttributeError: 'NoneType' object has no attribute 'strip' This can happen in a multiconfig build where the default configuration use the buildhistory class but not the configuration in mc. It should be a rare case that this happens and it was found in a missconfigured build. (From OE-Core rev: a74e30a4de02c8efd3e7102ba7a4fe06df53cc34) (From OE-Core rev: 83ee03a6f05ff60459dbcc4fcfb78f95bb0b4848) Signed-off-by: Peter Bergin <peter@berginkonsult.se> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 55ead1be58679c3bcb7d1c141672b999d53e90ef) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-26Revert "classes/buildhistory: also save recipe info for native recipes"Richard Purdie
This reverts commit d123606c4bef85c2436b40f51e47b602b7600c0b. This change contains races as it will start poking into do_package task directories from do_populate_sysroot. If we want to do this for native recipes, we need to add guards around the package code and only make this happen for native in populate_sysroot, not target in populate_sysroot too. Backtrace from an example problem below: ERROR: openssl-1.1.1g-r0 do_populate_sysroot: Error executing a python function in exec_python_func() autogenerated: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_python_func() autogenerated', lineno: 2, function: <module> 0001: *** 0002:buildhistory_emit_pkghistory(d) 0003: File: '/home/ross/Yocto/poky/meta/classes/buildhistory.bbclass', lineno: 319, function: buildhistory_emit_pkghistory 0315: 0316: write_pkghistory(pkginfo, d) 0317: 0318: # Create files-in-<package-name>.txt files containing a list of files of each recipe's package *** 0319: bb.build.exec_func("buildhistory_list_pkg_files", d) 0320:} 0321: 0322:python buildhistory_emit_outputsigs() { 0323: if not "task" in (d.getVar('BUILDHISTORY_FEATURES') or "").split(): File: '/home/ross/Yocto/poky/bitbake/lib/bb/build.py', lineno: 256, function: exec_func 0252: with bb.utils.fileslocked(lockfiles): 0253: if ispython: 0254: exec_func_python(func, d, runfile, cwd=adir) 0255: else: *** 0256: exec_func_shell(func, d, runfile, cwd=adir) 0257: 0258: try: 0259: curcwd = os.getcwd() 0260: except: File: '/home/ross/Yocto/poky/bitbake/lib/bb/build.py', lineno: 503, function: exec_func_shell 0499: with open(fifopath, 'r+b', buffering=0) as fifo: 0500: try: 0501: bb.debug(2, "Executing shell function %s" % func) 0502: with open(os.devnull, 'r+') as stdin, logfile: *** 0503: bb.process.run(cmd, shell=False, stdin=stdin, log=logfile, extrafiles=[(fifo,readfifo)]) 0504: except bb.process.ExecutionError as exe: 0505: # Find the backtrace that the shell trap generated 0506: backtrace_marker_regex = re.compile(r"WARNING: Backtrace \(BB generated script\)") 0507: stdout_lines = (exe.stdout or "").split("\n") File: '/home/ross/Yocto/poky/bitbake/lib/bb/process.py', lineno: 184, function: run 0180: if not stderr is None: 0181: stderr = stderr.decode("utf-8") 0182: 0183: if pipe.returncode != 0: *** 0184: raise ExecutionError(cmd, pipe.returncode, stdout, stderr) 0185: return stdout, stderr Exception: bb.process.ExecutionError: Execution of '/yocto/ross/build/tmp/work/neoversen1-poky-linux/openssl/1.1.1g-r0/temp/run.buildhistory_list_pkg_files.4158804' failed with exit code 2: /yocto/ross/build/tmp/work/neoversen1-poky-linux/openssl/1.1.1g-r0/temp/run.buildhistory_list_pkg_files.4158804: 183: cd: can't cd to /yocto/ross/build/tmp/work/neoversen1-poky-linux/openssl/1.1.1g-r0/packages-split/openssl-engines (From OE-Core rev: 59aac6e134289d657d80bfb1d6f25b388d539818) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-20classes/buildhistory: also save recipe info for native recipesPaul Eggleton
If we want to also collect SRC_URI for native recipes we need to ensure that the code that writes out all of the recipe info is called - there isn't a do_packagedata for native recipes so we need to piggyback on do_populate_sysroot instead. (From OE-Core rev: d123606c4bef85c2436b40f51e47b602b7600c0b) Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-20classes/buildhistory: record SRC_URIPaul Eggleton
It can be useful to record SRC_URI into buildhistory for the purposes of tracking exactly which sources got built (we already have SRCREV) as well as getting an indication when changes to the SRC_URI relate to changes in the output. (From OE-Core rev: 70714795aafc98a6df1df7f944867093eb8cafc7) Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-17image-artifact-names: introduce new bbclass and move some variables into itMartin Jansa
* similar to kernel-artifact-names for other recipes/bbclasses which need to use some deployed artifacts * bitbake.conf: move IMAGE_BASENAME, IMAGE_VERSION_SUFFIX, IMAGE_NAME, IMAGE_LINK_NAME variables * image_types.bbclass: move IMAGE_NAME_SUFFIX variable * currently IMAGE_NAME_SUFFIX is used only by image.bbclass, image_types.bbclass and meta/recipes-core/images/build-appliance-image_15.0.0.bb but if it's needed by some recipe which isn't itself an image, then it's useful in bitbake.conf, e.g. we have a recipe for creating VirtualBox appliances which combines .wic.vmdk with .ovf file to create .zip with appliance, but for that we need the filename of .wic.vmdk which now contains IMAGE_NAME_SUFFIX https://github.com/webOS-ports/meta-webos-ports/blob/4980ce52a43ac6897657602810313af359f0b839/meta-luneos/recipes-core/images/luneos-emulator-appliance.inc#L24 * we were hardcoding .rootfs suffix where needed, but for quite long time it's configurable with IMAGE_NAME_SUFFIX since: commit 380ee36811939d947024bf78de907e3c071b834f Author: Patrick Ohly <patrick.ohly@intel.com> Date: Mon Mar 7 18:07:52 2016 +0100 image creation: allow overriding .rootfs suffix and might not match with hardcoded .rootfs, so make it easier to use IMAGE_NAME_SUFFIX where needed even without inheritting whole image_types.bbclass [YOCTO #12937] (From OE-Core rev: 456b700d51a5052a285a8477304f902c335223be) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-28buildhistory.bbclass: Rework to use read_subpackage_metadataMark Hatle
Using this mechanism ensures that we have a single point to implement the loading of the package and subpackage meta data. This also then allows the buildhistory class to use the regular datastore vs it's own custom arrays for processing history items. (From OE-Core rev: 155ae6a3fe84c25904ffe7058e125bb4a28e2b45) Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-25buildhistory: use pid for temporary txt file nameLee Chee Yang
buildhistory create .txt file bh_installed_pkgs.txt and bh_installed_pkgs_deps.txt while listing down installed package. These file is later removed in buildhistory_get_installed(). when multiple process runs in parellal there are chances to race for the file where one process created the file while another task remove the file right after it. using different file name for each process should avoid the race. So add PID to the file name to make it unique. [yocto #13709] (From OE-Core rev: 214d236d93700abffa2d586cc744a00455818fa4) Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-04classes/buildhistory: capture package configJan Luebbe
As the PACKAGECONFIG variable has a large influence on the resulting package sizes and dependencies, it's useful to capture it in the recipe-level buildhistory. This makes it straightforward to analyze the impact of PACKAGECONFIG changes on the resulting image size. (From OE-Core rev: 189fae9f2df58759e9d66a3877c9ef30df4854bf) Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-04buildhistory: Allow customising buildhistory tagsDaniel McGregor
Allow setting custom buildhistory tag prefixes. This allows multiple build directories to share one buildhistory git repository with multiple worktrees. (From OE-Core rev: 1bb2aa53a74e36dc3ba901b9d8ce780e7880cef8) Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-14buildhistory: fix "version went backwards" QA error messageDenys Dmytriyenko
Fix parentheses placement in the message from: Package version for package X went backwards which would break package feeds from (Y to Z) to this one: Package version for package X went backwards which would break package feeds (from Y to Z) (From OE-Core rev: 3a5a61fb6b3f811bd4f7232ba902afcfd2019154) Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-10buildhistory: filter out the unexpected prefix for native/cross sysrootsRoss Burton
For various technical reasons, native and cross builds have a prefix that includes the full path to the sysroot. As these are stripped away before the files are used in the sysroot, we should also filter them out of the buildhistory report. This both removes noise when sharing a buildhistory repository between different build directories, and improves the accuracy of the reports. (From OE-Core rev: 8bf53fbb62749b5d77c246fab6e1246b93f8c50f) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-10buildhistory: don't output ownership for the sysrootRoss Burton
As the sysroot isn't ran inside pseudo the ownership is whoever is running the builds. In a setup where multiple builders all contribute to a shared buildhistory writing the ownership data isn't useful, so just replace it with "- -". (From OE-Core rev: fadb7ae78876a7cf25c48481ff4ed3131e53415f) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-28buildhistory: write the contents of the sysrootRoss Burton
Changes to the sysroot are just as interesting during development, so write the file listing for the sysroot to buildhistory too. (From OE-Core rev: b3ac82a27ab70ed6996fe3087a578ac637820329) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-19buildhistory: show time spent writting buildhistoryMartin Jansa
* especially when pushing longer history to slow remote git server or when it timeouts during the push, it's useful to see where the time was actually spent (From OE-Core rev: 96f1225d47985d94d9ed91eb5e7affdd70671c79) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-14classes/buildhistory: display modified git branchesAndré Draszik
When collecting the git revision of repositories, also take note of whether or not that repository has uncommited changes. This makes it a bit clearer what went on when looking at diffs. (From OE-Core rev: b9d780c7eeda0fefb13edde8bdba4f1d91e7823c) Signed-off-by: André Draszik <andre.draszik@jci.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-11buildhistory: simplify buildhistory_list_files()Jacob Kroon
Avoid duplicating shell code for the two cases, fakeroot/non-fakeroot. (From OE-Core rev: c4a931df28f45f95f19a13062b8dc38db60da342) Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-07classes/buildhistory: avoid git diff churn by sorting more dictionariesJacob Kroon
Sort 'srcrevs' and 'tag_srcrevs' before iterating over them in order to avoid unnecessary changes in the build history. (From OE-Core rev: 031d708aedda11d65ba9746af4f01b91264a1f86) Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-18classes/buildhistory: properly process escaped chars from pkgdataPaul Eggleton
All values written out to pkgdata are escaped (see write_if_exists() in package.bbclass). In practice there tend not to be characters that need escaping except in the scriptlets (pkg_preinst, pkg_postinst, pkg_prerm and pkg_postrm) where currently we still see the escape codes in the corresponding files within buildhistory (e.g. \n and \t) and thus also in the output of buildhistory-diff, hindering proper diffing of changes. To fix this, when we read values from pkgdata and write them out to buildhistory, we need to interpret the escape codes by doing the exact reverse of what we do in package.bbclass. (From OE-Core rev: c258379181a438cb01728d223b3d05e0ab205941) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-18classes/buildhistory: handle packaged files with names containing spacesPaul Eggleton
The FILELIST field of the package info file in the buildhistory repository is a space-separated list of all of the files in the package. If a name of a file packaged by a recipe contains a space character then of course the result was that we didn't handle its name properly. To fix that, use quotes around any filename containing spaces and at the other end use these quotes to extract the proper entries. Fixes [YOCTO #12742]. (From OE-Core rev: 801b705957dc683030d11393f43407d0b3506b6a) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05buildhistory: enable committing history by defaultPaul Eggleton
The most common usage for buildhistory is with commits enabled so that you actually collect history, rather than just keeping a snapshot of the most recent build state, therefore default BUILDHISTORY_COMMIT to "1". This really ought to have been the default in the beginning, I can't really explain why it wasn't. (From OE-Core rev: 8018a2349b7ad5ab27731c93a49603adf5f72fc2) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-26meta: drop True option to getVar callsMing Liu
Search made with the following regex: getVar ?\((.*), True\). (From OE-Core rev: dbc0eaf478feb3f752ae22fd184984494fc85d0a) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-23buildhistory.bbclass: add ptest2.4_M3Robert Yang
The ptest log will be saved to buildhistory/ptest, we can easily get the regression result between builds by: $ git show HEAD ptest/pass.fail.skip.* [YOCTO #11547] (From OE-Core rev: dcb6cd19fb8c639cb844d116fb83827267f37421) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-23buildhistory.bbclass: print message when no commitRobert Yang
This makes the user easier to know how to make commit in buildhistory. [YOCTO #11547] (From OE-Core rev: 164a0bd847f02ca65dcd53ddc789690060274191) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-23classes/buildhistory: fix failures collecting output signaturesPaul Eggleton
It's possible for tasks to stage symlinks that point to non-existent files; an example is ncurses-native.do_populate_sysroot. There wasn't any error checking here so this broke the build when "task" was included in BUILDHISTORY_FEATURES. In any case we shouldn't be following symlinks and getting the sha256sum of the link target - we need concern ourselves only with the target path, so check if the file is a link and sha256 the target path instead if it is. If it's neither a regular file nor a symlink (perhaps a pipe or a device), just skip it. (From OE-Core rev: f60520d97f53dafe783f61eb58fe249798a1e1be) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-12meta/classes/populate_sdk: Adds support for generating eSDK manifest filesFrancisco Pedraza
Add get_extra_sdk_info to reuse code in buildhistory The functionalities to generate SDK and eSDK manifest files are different, the SDK comes from package information and the eSDK comes from sstate artifacts. Only execute write_sdk_{host, target}_manifest when is on populate_sdk class. Adds new functions write_sdk{host, target}_ext_manifest to execute on postprocess in populate_sdk_ext because at the end we have all the sstate artifacts to generate the manifest. [YOCTO #9038] (From OE-Core rev: 25ad7ed6f7bb0c931b404bda09576323200d093d) Signed-off-by: Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-12lib/oe/sdk: Adds get_extra_sdk_info to reuse code in buildhistoryFrancisco Pedraza
This function is going to be used for generating the target and host manifest files packages for eSDK. Added some fixes for buildhistory.bblclass, and docstring for get_extra_sdkinfo at oe.sdk [YOCTO #9038] (From OE-Core rev: f696b3bbe01969ce7ecb8174d63d3e1e172b473e) Signed-off-by: Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-12buildhistory.bbclass: Improve the generated depends.dot filePeter Kjellerstedt
* Convert incorrectly formatted dependencies such as: "bar -> "foo" ">=" "1.2.3" into dependencies with edge labels: "bar -> "foo" [label=">= 1.2.3"] * Remove rpmlib() and config() dependencies such as: "foo" -> "rpmlib(CompressedFileNames)" [label="<= 3.0.4-1"] and: "base-files" -> "config(base-files)" [label="= 3.0.14-r89.49"] * Remove the trailing semicolon that was added to each line. It fills no purpose. (From OE-Core rev: 37ea2c8b299483f0e12fad66efa789c6445571e0) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-12buildhistory: force writing SRCREV valuesEd Bartosh
Enabling SSTATE_MIRRORS sometimes causes SRCREV values not to be written/updated in the build history. This happens more often if SRCREV is set to ${AUTOREV} Explicitly writing SRCREVs when recipe history is being written should fix this. [YOCTO #10948] (From OE-Core rev: df74b97599a789db742fc7588009783f5f37ebff) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-12classes/buildhistory: use BB_CMDLINE to get bitbake command linePaul Eggleton
We put the bitbake command line in the buildhistory commit message for informational purposes, but calling sys.argv to get that as we were previously doesn't really work in memory resident mode - that gives you the command used to start the bitbake server which is much less interesting. Use the just-introduced BB_CMDLINE variable instead. Part of the fix for [YOCTO #11634]. (From OE-Core rev: 1a6424ee4c865601ff324e9599a2f48c9e6723ee) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-03classes/buildhistory: make a single commit per buildPaul Eggleton
Way back in OE-Core commit fba198ac7efe476a25c5761878ef2fcee97bf9f1 in 2012 we split committing to the repository, making a commit per top-level directory. However, as we add more information it becomes harder to see which commits belong to which build. Switch back to a single commit per build to keep the history tidier. To address the original concern, if you do want to see just the changes for a particular subdirectory, git can filter that for you - just specify that subdirectory as the last parameter on the git show / git diff command line and that's all you will see. (From OE-Core rev: b49a4a47783609fe9161fbc11cc7c7ff3ff4b6bb) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-11classes/buildhistory: save output file signatures for sstate tasksPaul Eggleton
Save a file per task listing sha256sums for each file staged, i.e. the output of the task. Some caveats: 1) This only covers sstate tasks since it uses SSTATEPOSTUNPACKFUNCS, however those are generally the most interesting in terms of output anyway. 2) The signature is taken before applying any relocations, so any relocated files will actually have different signatures, but that's churn that you probably won't want to see here. 3) At the moment if you run the same build twice without sstate you will very likely see changes in the output for certain tasks due to things like timestamps being present in the binary output. Fixing that is a general Linux ecosystem problem - see this page for our efforts to resolve it on our side: https://wiki.yoctoproject.org/wiki/Reproducible_Builds NOTE: you need to set your BUILDHISTORY_FEATURES value to include "task" to enable collection of these signatures as it is is disabled by default. (From OE-Core rev: ca5d1273432e20059ab66d721a9eb314a54e81e7) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-11classes/buildhistory: write out task signatures on every buildPaul Eggleton
If we want to determine what changed since the last build, one angle from which to look at it is to check the signatures. However, if we don't actually have the signatures from the last build we don't have anywhere to start. Save the signatures on each build in order to give us the starting point. NOTE: you need to set your BUILDHISTORY_FEATURES value to include "task" to enable collection of these signatures as it is is disabled by default. (From OE-Core rev: 11f68f65c46c5bc26ddeeade3021e83b3a7f895a) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-11buildhistory.bbclass: do not influence sstate of do_rootfsPatrick Ohly
Enabling or disabling buildhistory caused a rebuild of images, which is undesirable. For example, it prevented image reuse from a main build with buildhistory in a following oe-selftest where buildhistory must be disabled. The reason are the additional ROOTFS_POSTUNINSTALL_COMMAND and ROOTFS_POSTUNINSTALL_COMMAND entries. Those need to be excluded both via vardepvalueexclude and vardepsexclude. (From OE-Core rev: e4c28ea05ef4514deb3d19e8e33f81d352712455) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22buildhistory.bbclass: add layer name to source recipe dataMikko Rapeli
It is useful to know which layer provided a given recipe and its binary packages. Many projects combine a number of layers and some of them also provide same recipe names in which case bitbake can prioritize between them. buildhistory can record the decision by saving the layer from where the recipe was taken from. Also, if a project is split to sub projects which maintain recipes in different meta layers, then meta layer specific summaries of e.g. disk usage can be calculated if source recipes meta layer name is recorded for example in buildhistory. If source layer is not in build history, then layer providing the recipe can be exported from build environment using 'bitbake-layers show-recipes', but it takes a long time to execute since all recipes are parsed again and requires full source tree with correct build configuration. This patch exports the name of layer as configured in BBFILE_COLLECTIONS append of its layer.conf. 'bitbake-layers show-recipes' exports the meta layers directory path name. For several open source layers these are different, e.g. meta-openembedded/meta-perl/conf/layer.conf is perl-layer, poky/meta/conf/layer.conf is core, poky/meta-skeleton/conf/layer.conf is skeleton etc. (From OE-Core rev: d8e59d1f840e4282859ad14397d1c06516b8eb11) Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-08buildhistory.bbclass: Only execute get_extra_sdkinfo when sdk is enabledAníbal Limón
If sdk ins't in BUILDHISTORY_FEATURES the get_extra_sdkinfo fails because no information about sdk is generated in buildhistory repo. (From OE-Core rev: e6a0ea6146171635c49b18e00b4b11a9a7ff20ee) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04buildhistory.bbclass: use tabs as separator in installed-package-sizes.txtMikko Rapeli
All other fields are separated by tabs except KiB and binary package name. This helps users, *cough managers*, who import this file into MS Excel to calculate file system usage summaries. (From OE-Core rev: e26bed8493d7b096740cd6fff2e72ab27d48a933) Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15classes: Drop now unneeded update_data callsRichard Purdie
Now that the datastore works dynamically we don't need the update_data calls so we can just remove them. They're not actually done anything at all for a while. (From OE-Core rev: 8de0c5d3bd01919e2bf0394f9c485936d6098cec) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-16meta: remove True option to getVar callsJoshua Lock
getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) (From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-28buildhistory: fix latest_srcrev in the common caseChristopher Larson
buildhistory was writing srcrevs.values() as SRCREV when only one srcrev/branch exists. This returns a view of the dictionary values in python 3, and used to return a list in python 2, neither of which is an appropriate value for SRCREV. It was resulting in latest_srcrev files like this: # SRCREV = "346584bf6e38232be8773c24fd7dedcbd7b3d9ed" SRCREV = "dict_values(['346584bf6e38232be8773c24fd7dedcbd7b3d9ed'])" Which in turn would result in invalid output in buildhistory-collect-srcrevs. Fix by calling `next(iter())` on the `.values()` (From OE-Core rev: ef826a395612400924bbe49859d256b237ff59e1) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-07utils.bbclass: add function to check for git config userStephano Cetola
If attempting to patch a git repo without a proper git config setup, an error will occur saying user.name/user.email are needed by git am/apply. After some code was removed from kernel-yocto, it was simple enough to reproduce this error by creating a kernel patch and using a container to build. This patch abstracts out functionality that existed in buildhistory for use in other classes. It also adds a call to this functionality to the kernel-yocto class. Fixes [YOCTO #10346] introduced in OE-core revision 0f698dfd1c8bbc0d53ae7977e26685a7a3df52a3 (From OE-Core rev: 25b43cb05c645e43f96bc18906441b8fdc272228) Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-10buildhistory: output package variables in a repeatable orderRoss Burton
This code was outputting variables by iterating a dictionary. In Py2 this always results in the same iteration order but with Py3 the order changes every execution, which resulted in buildhistory having to store diffs where fields were simply re-ordered. (From OE-Core rev: f9faa8df85317d12743134a44576b4882a9fb22a) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-26classes/buildhistory: ensure eSDK sstate lists sorted secondarily by namePaul Eggleton
I got fed up with seeing items dance around in sstate-package-sizes.txt in the buildhistory git repo simply because they have the same size. Let's sort the list first by size and then also by name to ensure items with the same size are deterministically sorted. (From OE-Core rev: 7340c1ea677731d21351d47d935d9de7d7e2eda5) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-26classes/buildhistory: add additional variables for eSDKPaul Eggleton
Add SDK_INCLUDE_PKGDATA and SDK_INCLUDE_TOOLCHAIN to the variables that we put into sdk-info.txt (From OE-Core rev: 4bf5be6a1fc39f367bbb59e1787cb55e7b5835ae) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02classes/lib: Complete transition to python3Richard Purdie
This patch contains all the other misc pieces of the transition to python3 which didn't make sense to be broken into individual patches. (From OE-Core rev: fcd6b38bab8517d83e1ed48eef1bca9a9a190f57) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02classes/lib: Update to explictly create lists where neededRichard Purdie
Iterators now return views, not lists in python3. Where we need lists, handle this explicitly. (From OE-Core rev: caebd862bac7eed725e0f0321bf50793671b5312) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02classes/lib: Update to match python3 iter requirementsRichard Purdie
python3 standardises its use of iteration operations. Update the code to match the for python3 requires. (From OE-Core rev: 2476bdcbef591e951d11d57d53f1315848758571) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02classes/lib: Update to use python3 command pipeline decodingRichard Purdie
In python3, strings are unicode by default. We need to encode/decode from command pipelines and other places where we interface with the real world using the correct locales. This patch updates various call sites to use the correct encoding/decodings. (From OE-Core rev: bb4685af1bffe17b3aa92a6d21398f38a44ea874) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-15buildhistory: don't alter SDK creation stampsRoss Burton
This class adds functions to the SDK creation hooks, so ensure that they're ignored in task stamps. (From OE-Core rev: b15b977d10b5165728c1238b8d67a73719d29d60) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-05classes/buildhistory: fix grammar in commentsPaul Eggleton
Fix a minor grammatical error in the comments here. (From OE-Core rev: ddc60aea113e587f27df03645620d6eb677ff28a) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>