summaryrefslogtreecommitdiffstats
path: root/meta/classes/image-buildinfo.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* classes: Drop ';' delimiter from ROOTFS/IMAGE*COMMAND variablesRichard Purdie2023-09-091-2/+2
| | | | | | | | | | | | | Originally these were shell functions but they have long since been processed by bb.build.exec_func(). Since we no longer need shell syntax, we can drop the ';' delimiters and just use a space separated string. This cleans up the variable and quietly removes any stray ';' that do happen to still make it in. (From OE-Core rev: c3365dfd9ddd7fbe70b62e0f11166e57a8ca6f73) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Add SPDX license identifiersRichard Purdie2022-08-121-1/+1
| | | | | | | | | | | | As stated in our top level license files, the license is MIT unless otherwise stated. Add SPDX identifers accordingly. Replace older license statementa with the standardised syntax. Also drop "All Rights Reserved" expression as it isn't used now, doesn't mean anything and is confusing. (From OE-Core rev: 081a391fe09a21265881e39a2a496e4e10b4f80b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-buildinfo: Improve and extend to SDK coverage tooRichard Purdie2022-06-111-6/+22
| | | | | | | | | | | | Rename the default file from "build" to "buildinfo" since this is more obvious to anyone looking in an image. Add SDK_BUILDINFO_FILE and allow the same information to be written into SDK images. This will be useful for buildtools-tarball and uninative-tarball. (From OE-Core rev: 38b9525f1d5377288922e7cbac3f30afe6046242) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base/buildhistory/image-buildinfo: Use common buildcfg functionRichard Purdie2022-06-111-6/+2
| | | | | | | | Reduce code duplication to a common function in oe.buildcfg. (From OE-Core rev: 0b191a1df4c3722defb09dde0c16b1d9e7fe7ef6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/buildcfg: Share common clean/dirty layer functionRichard Purdie2022-06-111-17/+1
| | | | | | | | | The comments even say this was copy/paste code. Move to a shared library function. (From OE-Core rev: ac3de2f850a418673b87e1c454970cb099e191b0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildcfg: Move git/layer revision code into new OE module buildcfgRichard Purdie2022-06-111-2/+2
| | | | | | | | | There is a load of duplicated git/layer/revision code which makes most sesne as a python library, not bbclass code. Start to refactor as such. (From OE-Core rev: 439cdf8a1e52fd2c4dc81dc40ce7e6af282ce7ac) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-buildinfo: Remove unused function argumentJoshua Watt2018-12-081-4/+2
| | | | | | | | | | Removes the listvars argument to image_buildinfo_outputvars(). It doesn't appear that this argument ever did anything. (From OE-Core rev: 66ff9408291f3df98e8a6cb3e6e348d7ec8f401d) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-buildinfo,oeqa/selftest/containerimage: Ensure image-buildinfo doesn't ↵Richard Purdie2018-11-091-0/+2
| | | | | | | | | | | | | | | | | | | break tests Having image-buildinfo enabled causes containerimage.ContainerImageTests.test_expected_files to fail due to the presence of an unexpected file: ['./', './etc/', - './etc/build', './etc/default/', './etc/default/postinst', Tweak the class to allow it to be disabled and disable it from the test just in case it was enabled. (From OE-Core rev: af67bf422a4df5b7e07894512ff73a5f493682ab) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-buildinfo.bbclass: configurable location for build filePatrick Ohly2017-03-221-1/+4
| | | | | | | | | | | | | In a stateless image, /etc is not a good place for the "build" file. By definining the location with a variable it becomes possible to have the file created elsewhere on a per-image basis. The default is the same as before. (From OE-Core rev: 6750ea8160edccb156cb2ab68548adfc1c789895) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: remove True option to getVarFlag callsJoshua Lock2016-12-161-1/+1
| | | | | | | | | | | | | | | getVarFlag() now defaults to expanding by default, thus remove the True option from getVarFlag() calls with a regex search and replace. Search made with the following regex: getVarFlag ?\(( ?[^,()]*, ?[^,()]*), True\) (From OE-Core rev: 2dea9e490a98377010b3d4118d054814c317a735) 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>
* meta: remove True option to getVar callsJoshua Lock2016-12-161-5/+5
| | | | | | | | | | | | | 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>
* image-buildinfo: treat staged changes as modified branch, tooAndré Draszik2016-11-151-1/+3
| | | | | | | | | | | | | | | | | | | | | | | When staging changes in a layer using git add, image-buildinfo doesn't detect this as a modification, because of the way it uses git diff. Surely, merely staging, but not committing changes to git should not result in image-buildhistory assuming that the git repository hasn't been modified compared to the branch HEAD, this state should be treated similarly to modifications being unstaged. We have to use both, git diff and git diff --cached to get the desired result. (From OE-Core rev: b46906889665f6ab72bccee608276646cda50140) Signed-off-by: André Draszik <adraszik@tycoint.com> Reported-by: Lukasz Nowak <lnowak@tycoint.com> Reviewed-by: Lukasz Nowak <lnowak@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-buildinfo: restore trailing newlineAndré Draszik2016-10-011-1/+3
| | | | | | | | | | | The last line in the generated /etc/build doesn't end with a newline anymore, restore it. (From OE-Core rev: afbd3917061212558ccacda129eff516b735e5b1) Signed-off-by: André Draszik <git@andred.net> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-buildinfo: Update to python3 syntaxRichard Purdie2016-06-051-1/+1
| | | | | | (From OE-Core rev: 6e7d9dd9b5cbf46b955036876a25353fafbf264c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-buildinfo.bbclass: fix performance problemsPatrick Ohly2016-03-121-13/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | Inheriting image-buildinfo.bbclass primarily slowed down image building for two reasons: 1. The content of the shell command "buildinfo" gets expanded multiple times, each time again checking the state of all layers. 2. When expanded as part of the actual image creation, git is invoked under pseudo, which makes the check quite a bit slower (from a few seconds to a minute with many layers). To fix this, buildinfo now is a Python method which calls the checks only when really executed. Pseudo is told to unload itself when starting git. In addition, "git diff" is invoked with "--quiet", which avoids producing output that is just getting thrown away. As before, any kind of problem or output causes the layer to be marked as "modified". [Revision 2 of the change with some dead code removed] (From OE-Core rev: e59547e4154b772a36f4e58f1d454c0c38653c84) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/lib: Add expand parameter to getVarFlagRichard Purdie2016-02-041-1/+1
| | | | | | | | | | | | | | | | This sets the scene for removing the default False for expansion from getVarFlag. This would later allow True to become the default. On the most part this is an automatic translation with: sed -e 's:\(\.getVarFlag([^,()]*, [^,()]*\)):\1, True):g' -i `grep -ril getVar *` In this case, the default was False, but True was used since in most cases here expansion would be expected. (From OE-Core rev: 42a10788e89b07b14a150ced07113566cf99fcdd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-buildinfo.bbclass: new class, writes build information to imageAlejandro Hernandez2014-11-091-0/+69
Writes build information to target filesystem on /etc/build such as enabled layers, their current status and commit. squashspaces was moved to oe/utils.py to make it available to different classes and avoid code duplication. [YOCTO #6770] (From OE-Core rev: c9cc652e88ddedddf8a2f23fb9b8c024616526d7) Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>