summaryrefslogtreecommitdiffstats
path: root/meta/classes/buildhistory.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* buildhistory: use pid for temporary txt file nameLee Chee Yang2020-07-311-5/+6
| | | | | | | | | | | | | | | | | | | | | | | 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: af8f5fe82f27702ad727b27daefd5e97d9e64efa) Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 214d236d93700abffa2d586cc744a00455818fa4) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: Allow customising buildhistory tagsDaniel McGregor2020-02-041-3/+4
| | | | | | | | | | | 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>
* buildhistory: fix "version went backwards" QA error messageDenys Dmytriyenko2019-11-141-1/+1
| | | | | | | | | | | | 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>
* buildhistory: filter out the unexpected prefix for native/cross sysrootsRoss Burton2019-07-101-1/+12
| | | | | | | | | | | | | | 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>
* buildhistory: don't output ownership for the sysrootRoss Burton2019-07-101-1/+15
| | | | | | | | | | | | 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>
* buildhistory: write the contents of the sysrootRoss Burton2019-06-281-1/+9
| | | | | | | | | | 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>
* buildhistory: show time spent writting buildhistoryMartin Jansa2019-06-191-0/+4
| | | | | | | | | | | * 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>
* classes/buildhistory: display modified git branchesAndré Draszik2019-01-141-2/+19
| | | | | | | | | | | | | | 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>
* buildhistory: simplify buildhistory_list_files()Jacob Kroon2019-01-111-4/+6
| | | | | | | | | | 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>
* classes/buildhistory: avoid git diff churn by sorting more dictionariesJacob Kroon2019-01-071-2/+2
| | | | | | | | | | 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>
* classes/buildhistory: properly process escaped chars from pkgdataPaul Eggleton2018-07-181-1/+1
| | | | | | | | | | | | | | | | | | 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>
* classes/buildhistory: handle packaged files with names containing spacesPaul Eggleton2018-07-181-1/+2
| | | | | | | | | | | | | | | | | 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>
* buildhistory: enable committing history by defaultPaul Eggleton2017-11-051-1/+1
| | | | | | | | | | | | | | 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>
* meta: drop True option to getVar callsMing Liu2017-09-261-1/+1
| | | | | | | | | 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>
* buildhistory.bbclass: add ptest2.4_M3Robert Yang2017-08-231-0/+30
| | | | | | | | | | | | | | 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>
* buildhistory.bbclass: print message when no commitRobert Yang2017-08-231-0/+2
| | | | | | | | | | | 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>
* classes/buildhistory: fix failures collecting output signaturesPaul Eggleton2017-06-231-1/+13
| | | | | | | | | | | | | | | | 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>
* meta/classes/populate_sdk: Adds support for generating eSDK manifest filesFrancisco Pedraza2017-06-121-1/+0
| | | | | | | | | | | | | | | | | | | | 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>
* lib/oe/sdk: Adds get_extra_sdk_info to reuse code in buildhistoryFrancisco Pedraza2017-06-121-12/+6
| | | | | | | | | | | | | | 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>
* buildhistory.bbclass: Improve the generated depends.dot filePeter Kjellerstedt2017-06-121-4/+11
| | | | | | | | | | | | | | | | | | * 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>
* buildhistory: force writing SRCREV valuesEd Bartosh2017-06-121-2/+5
| | | | | | | | | | | | | | | | 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>
* classes/buildhistory: use BB_CMDLINE to get bitbake command linePaul Eggleton2017-06-121-5/+8
| | | | | | | | | | | | | | | | 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>
* classes/buildhistory: make a single commit per buildPaul Eggleton2017-06-031-7/+5
| | | | | | | | | | | | | | | | | | | 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>
* classes/buildhistory: save output file signatures for sstate tasksPaul Eggleton2017-04-111-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* classes/buildhistory: write out task signatures on every buildPaul Eggleton2017-04-111-0/+12
| | | | | | | | | | | | | | | | | 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>
* buildhistory.bbclass: do not influence sstate of do_rootfsPatrick Ohly2017-04-111-4/+8
| | | | | | | | | | | | | | | | 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>
* buildhistory.bbclass: add layer name to source recipe dataMikko Rapeli2017-03-221-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* buildhistory.bbclass: Only execute get_extra_sdkinfo when sdk is enabledAníbal Limón2017-03-081-1/+3
| | | | | | | | | | | 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>
* buildhistory.bbclass: use tabs as separator in installed-package-sizes.txtMikko Rapeli2017-03-041-1/+1
| | | | | | | | | | | | 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>
* classes: Drop now unneeded update_data callsRichard Purdie2017-02-151-1/+0
| | | | | | | | | | 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>
* meta: remove True option to getVar callsJoshua Lock2016-12-161-31/+31
| | | | | | | | | | | | | 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>
* buildhistory: fix latest_srcrev in the common caseChristopher Larson2016-10-281-1/+1
| | | | | | | | | | | | | | | | | | | 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>
* utils.bbclass: add function to check for git config userStephano Cetola2016-10-071-9/+6
| | | | | | | | | | | | | | | | | | | | | | 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>
* buildhistory: output package variables in a repeatable orderRoss Burton2016-08-101-10/+8
| | | | | | | | | | | | 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>
* classes/buildhistory: ensure eSDK sstate lists sorted secondarily by namePaul Eggleton2016-07-261-2/+2
| | | | | | | | | | | | 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>
* classes/buildhistory: add additional variables for eSDKPaul Eggleton2016-07-261-1/+1
| | | | | | | | | | 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>
* classes/lib: Complete transition to python3Richard Purdie2016-06-021-1/+1
| | | | | | | | | 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>
* classes/lib: Update to explictly create lists where neededRichard Purdie2016-06-021-1/+1
| | | | | | | | | 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>
* classes/lib: Update to match python3 iter requirementsRichard Purdie2016-06-021-1/+1
| | | | | | | | | 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>
* classes/lib: Update to use python3 command pipeline decodingRichard Purdie2016-06-021-8/+4
| | | | | | | | | | | 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>
* buildhistory: don't alter SDK creation stampsRoss Burton2016-04-151-4/+8
| | | | | | | | | | 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>
* classes/buildhistory: fix grammar in commentsPaul Eggleton2016-04-051-1/+1
| | | | | | | | | 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>
* classes/buildhistory: fix filtering of depends-nokernel.dotPaul Eggleton2016-04-051-1/+1
| | | | | | | | | | | | | | For images we produce a number of filtered dependency .dot files for readability, the first of which is depends-nokernel.dot which filters out just the kernel itself (not kernel modules). Unfortunately the filter specifications hadn't been updated for the dash-to-underscore removal or the 4.x kernel upgrade, thus the filtering wasn't actually doing anything. (From OE-Core rev: ec1077bed0c1538084bceeafb957abe725b13b76) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: optimise getting package size listPaul Eggleton2016-04-051-10/+3
| | | | | | | | | | | | | | | | Invoking oe-pkgdata-util in turn for every package in the list was slow with a large image. Modify oe-pkgdata-util's read-value command to take an option to read the list of packages from a file, as well as prefix the value with the package name; we can then use this to get all of the package sizes at once. This reduces the time to gather this information from minutes to just a second or two. Fixes [YOCTO #7339]. (From OE-Core rev: 51c24904cc1bc823bccc3f179b8d7a192dace168) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory.bbclass: create image directory when neededPatrick Ohly2016-03-291-0/+1
| | | | | | | | | | | | | | | | | buildhistory_get_imageinfo() assumed that the buildhistory directory for the image had already been created earlier. That assumption is not true for special images (like the virtual swupd images from meta-swupd) where the entire traditional do_rootfs/do_image is skipped. Creating files-in-image.txt still makes sense for such images, so support them by creating the directory also in buildhistory_get_imageinfo(). (From OE-Core rev: 723328319ee53235969ec9cce7ff5d7729dcf8d7) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: record a few more variables for extensible SDKPaul Eggleton2016-03-121-1/+2
| | | | | | | | | | | | We've recently added SDK_EXT_TYPE and SDK_RECRDEP_TASKS and these will have an effect on the size and functionality of the SDK, so record them in sdk-info.txt. (From OE-Core rev: 1be0ae80f97bdee758232ec5397c09d73d57e1e0) 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>
* buildhistory.bbclass: remove out-dated information on requestPatrick Ohly2016-02-151-9/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | buildhistory.bbclass by design is incremental: each build adds or updates information. Information is never removed. Sometimes it can be useful to reduce the information only to those recipes that were build during a specific bitbake invocation, for example when the invocation does a full world build. This is now possible by setting BUILDHISTORY_RESET as explained in the modified class. The comment on the variable also mentions the caveats associated with using this mode. In this mode, buildhistory.bbclass first moves all existing information into a temporary directory called "old" inside the build history directory. There the information is used for the "version going backwards" QA check. Then when the build is complete and before (potentially) committing to git, the temporary directory gets deleted. Because information that has not changed during the build will be reconstructed during full world rebuilds, a git log will then only show real updates, additions and removals. (From OE-Core rev: 51f4eb5bfcd25f7160e50314f433cad126aa3e9a) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: fix for python function parsing changePaul Eggleton2016-02-151-3/+3
| | | | | | | | | | | Variable expressions are no longer expanded in python functions as of BitBake commit 8bf33a8e92c0e188fa392030025756196c96fcbb, so we've now got to do this explicitly here. (From OE-Core rev: 60fd4ff61a4ad240a89d48553002901c10e93178) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: Fix regex to handle versions without spacesRichard Purdie2016-02-141-1/+1
| | | | | | | | | | Its valid to have dependencies like XXX (=2.1) without spaces, as injected by debian.bbclass. The code was breaking these into separate components and destroying them so improve the regex to handle them. (From OE-Core rev: 613e96b06202f31870be411ca45b44237ae55b1c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: fix the check for existence of a git repoMarkus Lehtonen2016-01-301-1/+1
| | | | | | | | | | | | | | | | | | Previously, in order to determine the existence of an already initialized Git repository we checked if a directory named '.git' was present in the buildhistory dir. However, e.g. in the case of git submodules '.git' may also be a regular file referencing some other location which was causing unwanted behavior. This patch changes buildhistory.bbclass to check for any file named '.git' which fixes these problems. [YOCTO #8911] (From OE-Core rev: a5e931e0b1d941cc938fe2f49625c54b07fab0ce) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>