For a recipe with LICENSE containing multiple licenses and then individual packages having their own LICENSE_ settings, the license information in the RPM for ${PN} is ${LICENSE}, not ${LICENSE_${PN}} as it should be. It works correctly for all other packages. To reproduce: 1) Create "recipes-support/licensetest/licensetest_1.0.bb": LICENSE = "GPL-3.0 & LGPL-2.1" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-3.0;md5=c79ff39f19dfec6d293b95dea7b07891 \ file://${COREBASE}/meta/files/common-licenses/LGPL-2.1;md5=1a6d268fd218675ffea8be556788b780" inherit allarch do_install() { mkdir -p ${D}${bindir} ${D}${libdir} touch ${D}${bindir}/licensetest touch ${D}${libdir}/licensetest.so.1.0.0 } PACKAGE_BEFORE_PN += "${PN}-libs" LICENSE_${PN} = "GPL-3.0" LICENSE_${PN}-dbg = "GPL-3.0" LICENSE_${PN}-dev = "GPL-3.0" LICENSE_${PN}-libs = "LGPL-2.1" FILES_${PN}-libs = "${libdir}" 2) Make sure package_rpm is included in PACKAGE_CLASSES, e.g. by adding PACKAGE_CLASSES += "package_rpm" to "conf/local.conf". 3) Build licensetest: bitbake licensetest 4) Extract license information from the built packages: rpm -qilp tmp/deploy/rpm/*/licensetest*|grep 'Name\|License' This gives: Name : licensetest License : GPL-3.0 & LGPL-2.1 Name : licensetest-dbg License : GPL-3.0 Name : licensetest-dev License : GPL-3.0 Name : licensetest-libs License : LGPL-2.1 and as can be seen, the licenses are correct for licensetest-dbg, licensetest-dev and licensetest-libs, but wrong for licensetest.
$ dpkg -I licensetest_1.0-r0_all.ipk|grep License License: GPL-3.0 $ rpm -qilp licensetest-1.0-r0.noarch.rpm |grep License License : GPL-3.0 & LGPL-2.1 So it's a package_rpm thing.
$ rpm -qilp *|grep 'Name\|License' Name : licensetest License : GPL-3.0 Name : licensetest-dbg License : GPL-3.0 Name : licensetest-dev License : GPL-3.0 Name : licensetest-libs License : LGPL-2.1 Patch (package_rpm: correctly handle LICENSE_${PN}) is on the list now.
Fixed in oe-core 42e0de37d18f072dc5dcf5dc45cb441e4c2110d8.