On Fri, 2023-01-13 at 00:33 +0300, Sergey Zhmylev wrote: > From: Sergei Zhmylev <[email protected]> > > Currently arch is being calculated from either MACHINE_ARCH or > TUNE_PKGARCH. Some recipes do override PACKAGE_ARCH intentionally. > This commit makes possible to override ARCH for RPM packages > separately in order to simplify common rpm naming conformance. > > Signed-off-by: Sergei Zhmylev <[email protected]> > --- > meta/classes-global/package_rpm.bbclass | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/meta/classes-global/package_rpm.bbclass > b/meta/classes-global/package_rpm.bbclass > index 85d0bd7fce..3fb7466778 100644 > --- a/meta/classes-global/package_rpm.bbclass > +++ b/meta/classes-global/package_rpm.bbclass > @@ -678,6 +678,10 @@ python do_package_rpm () { > bb.utils.mkdirhier(pkgwritedir) > os.chmod(pkgwritedir, 0o755) > > + rpm_arch_override = d.getVar("RPM_ARCH_OVERRIDE") > + if package_arch != "noarch" and rpm_arch_override: > + pkgarch = rpm_arch_override > + > cmd = rpmbuild > cmd = cmd + " --noclean --nodeps --short-circuit --target " + pkgarch + > " --buildroot " + pkgd > cmd = cmd + " --define '_topdir " + workdir + "' --define '_rpmdir " + > pkgwritedir + "'"
This makes me very nervous. PACKAGE_ARCH can be overridden and I know of BSPs which inject a whole new level of architecture into the system but they don't need to make rpm backend specific changes to make it work. If we were to add such a thing we'd need a much clearer picture of when it should be used and why it is needed. Wouldn't all package backends need to adjust this? Cheers, Richard
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#175807): https://lists.openembedded.org/g/openembedded-core/message/175807 Mute This Topic: https://lists.openembedded.org/mt/96233100/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
