Hi Adrian,

On Thu, Jun 06, 2019 at 05:52:36PM +0300, Adrian Bunk wrote:
> This breaks the build for me:
> 
> ERROR: test-image-1.0-r0 do_rootfs: 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:license_create_manifest(d)
>      0003:
> File: 
> '/home/bunk/yoctomusl/yocto-test/sources/poky/meta/classes/license_image.bbclass',
>  lineno: 35, function: license_create_manifest
>      0031:            pkg_dic[pkg_name]["LICENSE"] = 
> pkg_dic[pkg_name][pkg_lic_name]
>      0032:
>      0033:    rootfs_license_manifest = 
> os.path.join(d.getVar('LICENSE_DIRECTORY'),
>      0034:                        d.getVar('IMAGE_NAME'), 'license.manifest')
>  *** 0035:    write_license_files(d, rootfs_license_manifest, pkg_dic, 
> rootfs=True)
>      0036:}
>      0037:
>      0038:def write_license_files(d, license_manifest, pkg_dic, rootfs=True):
>      0039:    import re
> File: 
> '/home/bunk/yoctomusl/yocto-test/sources/poky/meta/classes/license_image.bbclass',
>  lineno: 44, function: write_license_files
>      0040:    import stat
>      0041:
>      0042:    bad_licenses = (d.getVar("INCOMPATIBLE_LICENSE") or "").split()
>      0043:    bad_licenses = map(lambda l: canonical_license(d, l), 
> bad_licenses)
>  *** 0044:    bad_licenses = expand_wildcard_licenses(d, bad_licenses)
>      0045:
>      0046:    with open(license_manifest, "w") as license_file:
>      0047:        for pkg in sorted(pkg_dic):
>      0048:            if bad_licenses:
> File: 
> '/home/bunk/yoctomusl/yocto-test/sources/poky/meta/classes/license.bbclass', 
> lineno: 271, function: expand_wildcard_licenses
>      0267:    Return actual spdx format license names if wildcard used. We 
> expand
>      0268:    wildcards from SPDXLICENSEMAP flags and SRC_DISTRIBUTE_LICENSES 
> values.
>      0269:    """
>      0270:    import fnmatch
>  *** 0271:    licenses = wildcard_licenses[:]
>      0272:    spdxmapkeys = d.getVarFlags('SPDXLICENSEMAP').keys()
>      0273:    for wld_lic in wildcard_licenses:
>      0274:        spdxflags = fnmatch.filter(spdxmapkeys, wld_lic)
>      0275:        licenses += [d.getVarFlag('SPDXLICENSEMAP', flag) for flag 
> in spdxflags]
> Exception: TypeError: 'map' object is not subscriptable
> 
> ERROR: test-image-1.0-r0 do_rootfs: 'map' object is not subscriptable
> ERROR: test-image-1.0-r0 do_rootfs: Function failed: license_create_manifest
> ERROR: Logfile of failure stored in: 
> /home/bunk/yoctomusl/yocto-test/build_test/tmp/work/test-test-linux-musl/test-image/1.0-r0/temp/log.do_rootfs.29928
> ERROR: Task 
> (/home/bunk/yoctomusl/yocto-test/sources/meta-test/recipes-test/images/test-image.bb:do_rootfs)
>  failed with exit code '1'
> 

Funnily enough, you sent the log when I was already working on fixing
the issue :)

I only tested the v1 on package builds and not image builds, my bad.

Thanks for the report though, much appreciated.

I've sent a v2 (and you're Cc'ed to it).

Thanks,
Quentin
-- 
StreamUnlimited Engineering GmbH
High Tech Campus Vienna, Gutheil-Schoder-Gasse 10, 1100 Vienna, Austria
[email protected], www.streamunlimited.com
-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to