From: Michael Ho <michael...@bmw.de>

Refactor the addition of vardeps for this package class to use RPMEXTRAVARS
and pass the items through gen_packagevar so package name specific overrides
are accounted for. This matches the style used in package_ipk.bbclass. Since
do_package_write_rpm does not have any "extra vars" that affect the rpm
packaging yet, this commit has to add the variable.

This refactoring is needed to add PACKAGE_ADD_METADATA_RPM to RPMEXTRAVARS
so it affects the sstate hash of do_package_write_rpm.

Signed-off-by: Michael Ho <michael...@bmw.de>
---
 meta/classes/package_rpm.bbclass | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 9145717..9a4be2e 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -621,6 +621,10 @@ python write_specfile () {
 # Otherwise allarch packages may change depending on override configuration
 write_specfile[vardepsexclude] = "OVERRIDES"
 
+# Have to list any variables referenced as X_<pkg> that aren't in pkgdata here
+RPMEXTRAVARS = "PACKAGE_ADD_METADATA_RPM"
+write_specfile[vardeps] += "${@gen_packagevar(d, 'RPMEXTRAVARS')}"
+
 python do_package_rpm () {
     workdir = d.getVar('WORKDIR')
     tmpdir = d.getVar('TMPDIR')
-- 
2.7.4

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#138656): 
https://lists.openembedded.org/g/openembedded-core/message/138656
Mute This Topic: https://lists.openembedded.org/mt/74452488/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to