summaryrefslogtreecommitdiffstats
path: root/meta/classes/buildhistory.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* classes: Drop ';' delimiter from ROOTFS/IMAGE*COMMAND variablesRichard Purdie2023-09-091-13/+13
| | | | | | | | | | | | | 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-0/+2
| | | | | | | | | | | | 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>
* buildhistory: Only use image-artifact-names as an image classRichard Purdie2022-08-121-1/+1
| | | | | | | | | The class only makes sense in the conext of images, not globally so include as such. (From OE-Core rev: 4fdda4d6bd434c240ec1dfdbfc6eb7e25e2db1f3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base/buildhistory/image-buildinfo: Use common buildcfg functionRichard Purdie2022-06-111-7/+3
| | | | | | | | 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>
* buildhistory.bbclass: fix shell syntax when using dashMartin Jansa2022-06-081-1/+1
| | | | | | | | | | | | | | | | | | * fix: run.buildhistory_get_image_installed.791888: 198: [: unexpected operator introduced in: commit 82e6172c1df378dff4e503aa878501c08937b5bb Author: Andres Beltran <abeltran@linux.microsoft.com> Date: Tue Oct 5 00:34:15 2021 +0000 buildhistory: Fix package output files for SDKs (From OE-Core rev: 9852bedcb9eb8306a3f82f805ec4f76abbbbdd0f) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory.bbclass: create the buildhistory directory when neededJose Quaresma2022-03-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the BUILDHISTORY_RESET is enabled we need to move the content from BUILDHISTORY_DIR to BUILDHISTORY_OLD_DIR but when we start a clean build in the first run we don't have the BUILDHISTORY_DIR so the move of files will fail. | ERROR: Command execution failed: Traceback (most recent call last): | File "/xxx/poky/bitbake/lib/bb/command.py", line 110, in runAsyncCommand | commandmethod(self.cmds_async, self, options) | File "/xxx/poky/bitbake/lib/bb/command.py", line 564, in buildTargets | command.cooker.buildTargets(pkgs_to_build, task) | File "/xxx/poky/bitbake/lib/bb/cooker.py", line 1481, in buildTargets | bb.event.fire(bb.event.BuildStarted(buildname, ntargets), self.databuilder.mcdata[mc]) | File "/xxx/home/builder/src/base/poky/bitbake/lib/bb/event.py", line 214, in fire | fire_class_handlers(event, d) | File "/xxx/poky/bitbake/lib/bb/event.py", line 121, in fire_class_handlers | execute_handler(name, handler, event, d) | File "/xxx/poky/bitbake/lib/bb/event.py", line 93, in execute_handler | ret = handler(event) | File "/xxx/poky/meta/classes/buildhistory.bbclass", line 919, in buildhistory_eventhandler | entries = [ x for x in os.listdir(rootdir) if not x.startswith('.') ] | FileNotFoundError: [Errno 2] No such file or directory: '/xxx/buildhistory' (From OE-Core rev: 97bc2168da7dbacdfbf79cd70db674363ab84f6b) Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/scripts: Automated conversion of OE renamed variablesRichard Purdie2022-02-211-2/+2
| | | | | | (From OE-Core rev: aa52af4518604b5bf13f3c5e885113bf868d6c81) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/scripts: Change BB_ENV_EXTRA_WHITE -> BB_ENV_PASSTHROUGH_ADDITIONSRichard Purdie2022-02-211-1/+1
| | | | | | | | After the change to bitbake, update the references in OE-Core to match the updates. (From OE-Core rev: 193affb9f28b0116c3fd619834f145326fee08c5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: Fix do_package race issuesRichard Purdie2021-11-241-4/+8
| | | | | | | | | | | | | | The buildhistory_list_pkg_files function uses data from do_package, not do_packagedata. Usally the two are restored together but it may see a half complete directory or other races issues depending on timing. Rework the function so that it uses the correct task dependencies. This should avoid races but means the data is only restored to buildhistory if the do_package or do_package_setscene tasks are restored. (From OE-Core rev: b83823ce44e7531bbd2bfa62062c04147a11f724) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: Fix srcrevs outputRichard Purdie2021-11-231-17/+13
| | | | | | | | | | | | | | | | The code was assuming that the a recipe with only one srcrev wouldn't "name" it. This isn't the case as the glibc or bzip2 recipes show, you can have a single srcrev which is named. We can pull the data from the fetcher and in fact we already have it, we just need to handle the "default" case and make that code the default for all srcrev regardless of length. [YOCTO #14017] (From OE-Core rev: 45ae567932ba52b758eb41754453e9828d9533a1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: Drop support for older bitbakesRichard Purdie2021-11-231-11/+1
| | | | | | | | | We've bumped the minimum bitbake version past the point this fallback code was needed, drop it. (From OE-Core rev: c45ad27f3c43c9bbde5c4d19237411fdbc66920e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/qa,insane: Move extra error handling functions to libraryMike Crowe2021-10-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | Extract package_qa_write_error, package_qa_handle_error and package_qa_add_message functions from insane.bbclass to lib/oe/qa.py and drop the package_qa_ prefixes. Update various bbclasses to use the new functions. No import is required since base.bbclass puts oe.qa in OE_IMPORTS. Stop requiring callers to manually track whether a fatal error has been encountered via a "sane" flag. Instead replace the QA_SANE variable with QA_ERRORS_FOUND and call oe.qa.exit_if_errors or oe.qa.exit_with_message_if_errors at the end of each task. Inspired by discussion resulting from https://lists.openembedded.org/g/openembedded-core/message/156793 and https://lists.openembedded.org/g/openembedded-core/message/156900 (From OE-Core rev: f0ad152ef4cc15c042bc9eeefb6af096d054b220) Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: Fix package output files for SDKsAndres Beltran2021-10-141-5/+16
| | | | | | | | | | | | | | | | | Currently, installed packages are listed for images in image-info.txt, but not for SDKs in sdk-info.txt. Add TOOLCHAIN_HOST_TASK and TOOLCHAIN_TARGET_TASK to the output variables in sdk-info.txt. Moreover, package output files for the SDK host are empty because PKGDATA_DIR defaults to the target directory. Fix this bug and create a new variable called PKGDATA_DIR_SDK which stores the correct path for the SDK host package data. (From OE-Core rev: 82e6172c1df378dff4e503aa878501c08937b5bb) Signed-off-by: Andres Beltran <abeltran@linux.microsoft.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: Label packages providing per-file dependencies in depends.dotAndres Beltran2021-09-011-1/+3
| | | | | | | | | | | | | | | | Currently, depends.dot includes per-file dependencies but not the packages providing those files. This makes it hard to obtain all package dependencies by just looking at depends.dot. Parse the RPROVIDES and FILERPROVIDES fields from pkgdata to map each of their values to the package providing the component. Include runtime packages as dependencies in depends.dot, together with the component provided by the package as a label. (From OE-Core rev: 2ba33093017574bbe29eeba699eb90628614d03a) Signed-off-by: Andres Beltran <abeltran@linux.microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: Add output file listing package informationAndres Beltran2021-08-271-0/+5
| | | | | | | | | | | | | | | | Currently, buildhistory does not produce a single file combining relevant information of installed packages. Produce an output file "installed-package-info.txt" listing a package's runtime name, buildtime name, its recipe, version, and size to avoid having to look up each package externally. Leave the existing package list files as-is for backwards compatibility. In order to support this efficiently, extend oe-pkgdata-util to accept multiple keys for its read-value argument. (From OE-Core rev: 1e18b514bf1f960d324a21db608c8e8e5af007ef) Signed-off-by: Andres Beltran <abeltran@linux.microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Convert to new override syntaxRichard Purdie2021-08-021-7/+7
| | | | | | | | | | | | This is the result of automated script conversion: scripts/contrib/convert-overrides.py <oe-core directory> converting the metadata to use ":" as the override character instead of "_". (From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: Add option to strip path prefixJoshua Watt2021-06-031-1/+2
| | | | | | | | | | | Adds an option to strip a prefix from the paths reported in buildhistory. This makes it easier to compare task signatures in the build history when the builds were done from different directories. (From OE-Core rev: 194e7a29212c4a29222730f47d3133dfe92447c1) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/lib/scripts: Use bb.utils.rename() instead of os.rename()Devendra Tewari2021-05-061-1/+1
| | | | | | | | | | | | | | | | | | Incremental build in Docker fails with: OSError: [Errno 18] Invalid cross-device link when source and destination are on different overlay filesystems. Rather than adding fallback code to every call site, use a new wrapper in bitbake which detects this case and falls back to shutil.move which is slower but will handtle the overlay docker filesystems correctly. [YOCTO #14301] (From OE-Core rev: 656a65b2b84e7d529b89cf5de7eb838f902d84a2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: add missing vardepsexcludesChristopher Larson2021-03-311-0/+3
| | | | | | | | | 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: 554b17e0bbe5190e4b03121f2ed06f4845012a71) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory.bbclass: avoid exception for empty BUILDHISTORY_FEATURES variablePeter Bergin2021-01-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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) Signed-off-by: Peter Bergin <peter@berginkonsult.se> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: record LICENSESaul Wold2020-11-291-0/+4
| | | | | | | | | | | | Buildhistory stores various bits of information at both recipe and package level, while there is an associated license manifest directory tree it would require additional scripting to extract that information. (From OE-Core rev: 909bafef282f00dd4a83fab0569885e9788a4ed9) Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "classes/buildhistory: also save recipe info for native recipes"Richard Purdie2020-10-261-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* classes/buildhistory: also save recipe info for native recipesPaul Eggleton2020-10-201-4/+4
| | | | | | | | | | | | 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>
* classes/buildhistory: record SRC_URIPaul Eggleton2020-10-201-0/+3
| | | | | | | | | | | | 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>
* image-artifact-names: introduce new bbclass and move some variables into itMartin Jansa2020-09-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* buildhistory.bbclass: Rework to use read_subpackage_metadataMark Hatle2020-08-281-27/+22
| | | | | | | | | | | | 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>
* buildhistory: use pid for temporary txt file nameLee Chee Yang2020-07-251-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: 214d236d93700abffa2d586cc744a00455818fa4) Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: capture package configJan Luebbe2020-06-041-0/+3
| | | | | | | | | | | | 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>
* 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>