summaryrefslogtreecommitdiffstats
path: root/meta/classes/package_rpm.bbclass
diff options
context:
space:
mode:
authorMichael Ho <Michael.Ho@bmw.de>2020-05-25 09:45:49 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-05-25 22:25:27 +0100
commitb438a90fa4644dd3e5355f82730257ef579ceda9 (patch)
tree396d44e4df03c31939f9fd6e0ddf19aef49c61ef /meta/classes/package_rpm.bbclass
parentb244c4f3427cd07376d4b8f7d27e38735bcc90e7 (diff)
downloadopenembedded-core-contrib-b438a90fa4644dd3e5355f82730257ef579ceda9.tar.gz
package_rpm.bbclass: respect package overrides for the main package
Apply ${PN} to OVERRIDES when determining the base package spec variables. Without this, there is a mismatch in behaviour where overrides for the base package have no effect while overrides for subpackages do. The subpackages should not be affected by this override as they apply their own package overrides and will by default fetch the base variables and apply them in the spec file. This makes the behaviour for package overrides match the implementation in package_deb.bbclass and package_ipk.bbclass. Signed-off-by: Michael Ho <Michael.Ho@bmw.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package_rpm.bbclass')
-rw-r--r--meta/classes/package_rpm.bbclass22
1 files changed, 12 insertions, 10 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 9145717f98..56c1b66938 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -286,16 +286,18 @@ python write_specfile () {
# Construct the SPEC file...
srcname = d.getVar('PN')
- srcsummary = (d.getVar('SUMMARY') or d.getVar('DESCRIPTION') or ".")
- srcversion = d.getVar('PKGV').replace('-', '+')
- srcrelease = d.getVar('PKGR')
- srcepoch = (d.getVar('PKGE') or "")
- srclicense = d.getVar('LICENSE')
- srcsection = d.getVar('SECTION')
- srcmaintainer = d.getVar('MAINTAINER')
- srchomepage = d.getVar('HOMEPAGE')
- srcdescription = d.getVar('DESCRIPTION') or "."
- srccustomtagschunk = get_package_additional_metadata("rpm", d)
+ localdata = bb.data.createCopy(d)
+ localdata.setVar('OVERRIDES', d.getVar("OVERRIDES", False) + ":" + srcname)
+ srcsummary = (localdata.getVar('SUMMARY') or localdata.getVar('DESCRIPTION') or ".")
+ srcversion = localdata.getVar('PKGV').replace('-', '+')
+ srcrelease = localdata.getVar('PKGR')
+ srcepoch = (localdata.getVar('PKGE') or "")
+ srclicense = localdata.getVar('LICENSE')
+ srcsection = localdata.getVar('SECTION')
+ srcmaintainer = localdata.getVar('MAINTAINER')
+ srchomepage = localdata.getVar('HOMEPAGE')
+ srcdescription = localdata.getVar('DESCRIPTION') or "."
+ srccustomtagschunk = get_package_additional_metadata("rpm", localdata)
srcdepends = d.getVar('DEPENDS')
srcrdepends = []