[OE-core] [PATCH] package_rpm: correctly handle LICENSE_${PN}
Ross Burton
ross.burton at intel.com
Mon Jan 22 15:44:42 UTC 2018
RPM spec files don't distinguish between spec-level license and the primary
package license, so always output the License for every package (defaulting to
the recipe-wide license) and use LICENSE_${PN} if set for the primary package.
As the primary use of package_rpm is to generate built packages, this fixes the
license fields in the generated packages.
[ YOCTO #12057 ]
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
meta/classes/package_rpm.bbclass | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index b08608c8466..3cbbd1eb537 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -382,6 +382,7 @@ python write_specfile () {
# Gather special src/first package data
if srcname == splitname:
+ srclicense = splitlicense
srcrdepends = splitrdepends
srcrrecommends = splitrrecommends
srcrsuggests = splitrsuggests
@@ -421,8 +422,7 @@ python write_specfile () {
spec_preamble_bottom.append('Release: %s' % splitrelease)
if srcepoch != splitepoch:
spec_preamble_bottom.append('Epoch: %s' % splitepoch)
- if srclicense != splitlicense:
- spec_preamble_bottom.append('License: %s' % splitlicense)
+ spec_preamble_bottom.append('License: %s' % splitlicense)
spec_preamble_bottom.append('Group: %s' % splitsection)
if srccustomtagschunk != splitcustomtagschunk:
--
2.11.0
More information about the Openembedded-core
mailing list