From: Michael Ho Date: Mon, 25 May 2020 08:23:01 +0000 (+0200) Subject: package_rpm.bbclass: add PACKAGE_ADD_METADATA_RPM to sstate variables X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~11030 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e1907d7bd5f825d5ccca1da2a1e6ccc494088dd;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git package_rpm.bbclass: add PACKAGE_ADD_METADATA_RPM to sstate variables 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 Signed-off-by: Richard Purdie --- diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index 56c1b669385..519c22be472 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass @@ -623,6 +623,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_ 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')