summaryrefslogtreecommitdiffstats
path: root/meta/classes/image-buildinfo.bbclass
AgeCommit message (Collapse)Author
2018-12-08image-buildinfo: Remove unused function argumentJoshua Watt
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>
2018-11-09image-buildinfo,oeqa/selftest/containerimage: Ensure image-buildinfo doesn't ↵Richard Purdie
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>
2017-03-22image-buildinfo.bbclass: configurable location for build filePatrick Ohly
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>
2016-12-16meta: remove True option to getVarFlag callsJoshua Lock
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>
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-11-15image-buildinfo: treat staged changes as modified branch, tooAndré Draszik
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>
2016-10-01image-buildinfo: restore trailing newlineAndré Draszik
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>
2016-06-05image-buildinfo: Update to python3 syntaxRichard Purdie
(From OE-Core rev: 6e7d9dd9b5cbf46b955036876a25353fafbf264c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-12image-buildinfo.bbclass: fix performance problemsPatrick Ohly
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>
2016-02-04classes/lib: Add expand parameter to getVarFlagRichard Purdie
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>
2014-11-09image-buildinfo.bbclass: new class, writes build information to imageAlejandro Hernandez
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>