Bug 11089

Summary: License manifest creation fails
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Leonardo Sandoval Gonzalez <leonardo.sandoval.gonzalez>
Component: coreAssignee: Ross Burton <ross.burton>
Status: RESOLVED OBSOLETE QA Contact:
Severity: normal    
Priority: Medium+ CC: meta.mr.watcher, meta.watcher
Version: 2.3   
Target Milestone: 4.99   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Leonardo Sandoval Gonzalez 2017-02-20 16:18:42 UTC
Building core-image-sato:

bitbake core-image-sato
NOTE: Unable to use interactive mode for this terminal, using fallback
Parsing recipes: 100% |#################################################################################################################################################| Time: 0:00:05
Parsing of 856 .bb files complete (0 cached, 856 parsed). 1322 targets, 53 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = "1.33.1"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "opensuse-42.2"
TARGET_SYS        = "i586-poky-linux"
MACHINE           = "qemux86"
DISTRO            = "poky"
DISTRO_VERSION    = "2.2+snapshot-20170220"
TUNE_FEATURES     = "m32 i586"
TARGET_FPU        = ""
meta              
meta-poky         
meta-yocto-bsp    = "master:e436a6398684d2872cb541f1cfb0f67b3618d15a"

fails showing the following error:


The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
     0001:
 *** 0002:license_create_manifest(d)
     0003:
File: '/home/lsandov1/bug10884/poky/meta/classes/license.bbclass', lineno: 48, function: license_create_manifest
     0044:    pkg_dic = {}
     0045:    for pkg in sorted(image_list_installed_packages(d)):
     0046:        pkg_info = os.path.join(d.getVar('PKGDATA_DIR'),
     0047:                                'runtime-reverse', pkg)
 *** 0048:        pkg_name = os.path.basename(os.readlink(pkg_info))
     0049:
     0050:        pkg_dic[pkg_name] = oe.packagedata.read_pkgdatafile(pkg_info)
     0051:        if not "LICENSE" in pkg_dic[pkg_name].keys():
     0052:            pkg_lic_name = "LICENSE_" + pkg_name
Exception: FileNotFoundError: [Errno 2] No such file or directory: '/home/lsandov1/bug10884/poky/build/tmp/pkgdata/qemux86/runtime-reverse/warning:'

ERROR: core-image-sato-1.0-r0 do_rootfs: Function failed: license_create_manifest
ERROR: Logfile of failure stored in: /home/lsandov1/bug10884/poky/build/tmp/work/qemux86-poky-linux/core-image-sato/1.0-r0/temp/log.do_rootfs.23662
NOTE: recipe core-image-sato-1.0-r0: task do_rootfs: Failed
ERROR: Task (/home/lsandov1/bug10884/poky/meta/recipes-sato/images/core-image-sato.bb:do_rootfs) failed with exit code '1'
NOTE: Tasks Summary: Attempted 5742 tasks of which 5292 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /home/lsandov1/bug10884/poky/meta/recipes-sato/images/core-image-sato.bb:do_rootfs
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

This is happening on a opensuse box, with the following version

cat /etc/os-release
NAME="openSUSE Leap"
VERSION="42.2"
ID=opensuse
ID_LIKE="suse"
VERSION_ID="42.2"
PRETTY_NAME="openSUSE Leap 42.2"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:leap:42.2"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"
Comment 1 Ross Burton 2017-02-23 15:55:08 UTC
I suspect this is a race, as I see it occasionally on Debian too.
Comment 2 Ross Burton 2020-01-30 12:27:14 UTC
I haven't seen this since the bug was filed, so I suspect the race has been fixed.