<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/meta/classes/buildhistory.bbclass, branch hardknott</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=hardknott</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=hardknott'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2021-12-15T07:40:29+00:00</updated>
<entry>
<title>buildhistory: Fix srcrevs output</title>
<updated>2021-12-15T07:40:29+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2021-11-22T15:32:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=c90ca07d378e2902271e1a0197ba2c9de0b74322'/>
<id>urn:sha1:c90ca07d378e2902271e1a0197ba2c9de0b74322</id>
<content type='text'>
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: f21ae68097f331e772960bdb0d488fdd53a21055)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 45ae567932ba52b758eb41754453e9828d9533a1)
Signed-off-by: Anuj Mittal &lt;anuj.mittal@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>buildhistory: add missing vardepsexcludes</title>
<updated>2021-03-31T07:51:02+00:00</updated>
<author>
<name>Christopher Larson</name>
<email>kergoth@gmail.com</email>
</author>
<published>2021-03-30T17:27:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=8eb55de8212c218f28204abe2bb6adddcaef9898'/>
<id>urn:sha1:8eb55de8212c218f28204abe2bb6adddcaef9898</id>
<content type='text'>
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 &lt;chris_larson@mentor.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>buildhistory.bbclass: avoid exception for empty BUILDHISTORY_FEATURES variable</title>
<updated>2021-01-29T21:21:53+00:00</updated>
<author>
<name>Peter Bergin</name>
<email>peter@berginkonsult.se</email>
</author>
<published>2021-01-29T09:50:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=55ead1be58679c3bcb7d1c141672b999d53e90ef'/>
<id>urn:sha1:55ead1be58679c3bcb7d1c141672b999d53e90ef</id>
<content type='text'>
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 "&lt;...&gt;/meta/classes/buildhistory.bbclass", line 862, in buildhistory_eventhandler(e=&lt;bb.event.BuildStarted object at 0x7f94c3810250&gt;):
         python buildhistory_eventhandler() {
        &gt;    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 &lt;peter@berginkonsult.se&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>classes/buildhistory: record LICENSE</title>
<updated>2020-11-29T20:24:32+00:00</updated>
<author>
<name>Saul Wold</name>
<email>Saul.Wold@windriver.com</email>
</author>
<published>2020-11-25T18:58:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=355ca8732cce63ea2ecb6506212b0615a9acf45b'/>
<id>urn:sha1:355ca8732cce63ea2ecb6506212b0615a9acf45b</id>
<content type='text'>
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 &lt;saul.wold@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Revert "classes/buildhistory: also save recipe info for native recipes"</title>
<updated>2020-10-26T22:08:36+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2020-10-23T10:42:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=14335a18ddb61625f15b483e90353174925a8871'/>
<id>urn:sha1:14335a18ddb61625f15b483e90353174925a8871</id>
<content type='text'>
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: &lt;module&gt;
     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-&lt;package-name&gt;.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 &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>classes/buildhistory: also save recipe info for native recipes</title>
<updated>2020-10-20T10:11:46+00:00</updated>
<author>
<name>Paul Eggleton</name>
<email>paul.eggleton@microsoft.com</email>
</author>
<published>2020-10-19T04:03:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=1932b04a1e51c236ed8cc8412cf5c02560dbf502'/>
<id>urn:sha1:1932b04a1e51c236ed8cc8412cf5c02560dbf502</id>
<content type='text'>
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 &lt;paul.eggleton@microsoft.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>classes/buildhistory: record SRC_URI</title>
<updated>2020-10-20T10:11:46+00:00</updated>
<author>
<name>Paul Eggleton</name>
<email>paul.eggleton@microsoft.com</email>
</author>
<published>2020-10-19T04:03:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=71191e8e7aa36049685dd72b62c2e78495d6b401'/>
<id>urn:sha1:71191e8e7aa36049685dd72b62c2e78495d6b401</id>
<content type='text'>
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 &lt;paul.eggleton@microsoft.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>image-artifact-names: introduce new bbclass and move some variables into it</title>
<updated>2020-09-17T08:47:45+00:00</updated>
<author>
<name>Martin Jansa</name>
<email>Martin.Jansa@gmail.com</email>
</author>
<published>2020-09-16T12:54:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=43f1cf2d3d4b35b0bcd4bc9a4f464341af5f97dd'/>
<id>urn:sha1:43f1cf2d3d4b35b0bcd4bc9a4f464341af5f97dd</id>
<content type='text'>
* 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 &lt;patrick.ohly@intel.com&gt;
  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 &lt;Martin.Jansa@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>buildhistory.bbclass: Rework to use read_subpackage_metadata</title>
<updated>2020-08-28T06:08:37+00:00</updated>
<author>
<name>Mark Hatle</name>
<email>mark.hatle@kernel.crashing.org</email>
</author>
<published>2020-08-27T19:07:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=5cde141ef1e037aa540963f8356c0c556b47964d'/>
<id>urn:sha1:5cde141ef1e037aa540963f8356c0c556b47964d</id>
<content type='text'>
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 &lt;mark.hatle@kernel.crashing.org&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>buildhistory: use pid for temporary txt file name</title>
<updated>2020-07-25T14:11:05+00:00</updated>
<author>
<name>Lee Chee Yang</name>
<email>chee.yang.lee@intel.com</email>
</author>
<published>2020-07-23T01:16:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=4eef15704a58f65514d7e7b43d8abe3b3f78fcca'/>
<id>urn:sha1:4eef15704a58f65514d7e7b43d8abe3b3f78fcca</id>
<content type='text'>
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 &lt;chee.yang.lee@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
