summaryrefslogtreecommitdiffstats
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:53 +0100
commitc03dbb5afd6de0f94b0d83e7500fd738b2e5336f (patch)
tree17f7965fd4ad7e44346734d75803a77e1393c245
parentb38f320a3c2ea137d8c04d6cd7e078b5a233f485 (diff)
downloadpoky-c03dbb5afd6de0f94b0d83e7500fd738b2e5336f.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. (From OE-Core rev: b438a90fa4644dd3e5355f82730257ef579ceda9) Signed-off-by: Michael Ho <Michael.Ho@bmw.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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 () {
286 286
287 # Construct the SPEC file... 287 # Construct the SPEC file...
288 srcname = d.getVar('PN') 288 srcname = d.getVar('PN')
289 srcsummary = (d.getVar('SUMMARY') or d.getVar('DESCRIPTION') or ".") 289 localdata = bb.data.createCopy(d)
290 srcversion = d.getVar('PKGV').replace('-', '+') 290 localdata.setVar('OVERRIDES', d.getVar("OVERRIDES", False) + ":" + srcname)
291 srcrelease = d.getVar('PKGR') 291 srcsummary = (localdata.getVar('SUMMARY') or localdata.getVar('DESCRIPTION') or ".")
292 srcepoch = (d.getVar('PKGE') or "") 292 srcversion = localdata.getVar('PKGV').replace('-', '+')
293 srclicense = d.getVar('LICENSE') 293 srcrelease = localdata.getVar('PKGR')
294 srcsection = d.getVar('SECTION') 294 srcepoch = (localdata.getVar('PKGE') or "")
295 srcmaintainer = d.getVar('MAINTAINER') 295 srclicense = localdata.getVar('LICENSE')
296 srchomepage = d.getVar('HOMEPAGE') 296 srcsection = localdata.getVar('SECTION')
297 srcdescription = d.getVar('DESCRIPTION') or "." 297 srcmaintainer = localdata.getVar('MAINTAINER')
298 srccustomtagschunk = get_package_additional_metadata("rpm", d) 298 srchomepage = localdata.getVar('HOMEPAGE')
299 srcdescription = localdata.getVar('DESCRIPTION') or "."
300 srccustomtagschunk = get_package_additional_metadata("rpm", localdata)
299 301
300 srcdepends = d.getVar('DEPENDS') 302 srcdepends = d.getVar('DEPENDS')
301 srcrdepends = [] 303 srcrdepends = []