Skip to content
Snippets Groups Projects
This project is mirrored from https://git.yoctoproject.org/poky. Pull mirroring updated .
  1. Sep 27, 2024
  2. Jun 18, 2022
  3. Mar 02, 2022
    • Jose Quaresma's avatar
      buildhistory.bbclass: create the buildhistory directory when needed · 39aec4ac
      Jose Quaresma authored
      
      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: default avatarJose Quaresma <quaresma.jose@gmail.com>
      Signed-off-by: default avatarRichard Purdie <richard.purdie@linuxfoundation.org>
      39aec4ac
  4. Feb 21, 2022
  5. Nov 24, 2021
    • Richard Purdie's avatar
      buildhistory: Fix do_package race issues · 3ddbfe0b
      Richard Purdie authored
      
      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: default avatarRichard Purdie <richard.purdie@linuxfoundation.org>
      3ddbfe0b
  6. Nov 23, 2021
  7. Oct 17, 2021
  8. Oct 14, 2021
  9. Sep 01, 2021
  10. Aug 27, 2021
  11. Aug 02, 2021
  12. Jun 03, 2021
  13. May 06, 2021
  14. Mar 31, 2021
  15. Jan 29, 2021
    • Peter Bergin's avatar
      buildhistory.bbclass: avoid exception for empty BUILDHISTORY_FEATURES variable · 55ead1be
      Peter Bergin authored
      
      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: default avatarPeter Bergin <peter@berginkonsult.se>
      Signed-off-by: default avatarRichard Purdie <richard.purdie@linuxfoundation.org>
      55ead1be
  16. Nov 29, 2020
  17. Oct 26, 2020
    • Richard Purdie's avatar
      Revert "classes/buildhistory: also save recipe info for native recipes" · 14335a18
      Richard Purdie authored
      
      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: default avatarRichard Purdie <richard.purdie@linuxfoundation.org>
      14335a18
  18. Oct 20, 2020
  19. Sep 17, 2020
    • Martin Jansa's avatar
      image-artifact-names: introduce new bbclass and move some variables into it · 43f1cf2d
      Martin Jansa authored
      * 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: default avatarMartin Jansa <Martin.Jansa@gmail.com>
      Signed-off-by: default avatarRichard Purdie <richard.purdie@linuxfoundation.org>
      43f1cf2d
  20. Aug 28, 2020
  21. Jul 25, 2020
    • Lee Chee Yang's avatar
      buildhistory: use pid for temporary txt file name · 4eef1570
      Lee Chee Yang authored
      
      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: default avatarLee Chee Yang <chee.yang.lee@intel.com>
      Signed-off-by: default avatarRichard Purdie <richard.purdie@linuxfoundation.org>
      4eef1570
  22. Jun 04, 2020
  23. Feb 04, 2020
  24. Nov 14, 2019
  25. Jul 10, 2019
  26. Jun 28, 2019
  27. Jun 19, 2019
  28. Jan 14, 2019
  29. Jan 11, 2019
  30. Jan 07, 2019
  31. Jul 18, 2018
  32. Nov 05, 2017
  33. Sep 26, 2017
Loading