[OE-core] [PATCH] rpm: make rpm work in toolchain.

Zheng, Ruoqin zhengrq.fnst at cn.fujitsu.com
Mon Sep 9 11:19:47 UTC 2019


Hi Alex

I’d like to explain it.

->Why not simply ${D}/etc/rpm?


As you see, ${SDKTARGETSYSROOT} for x86_64 is /opt/poky/2.7+snapshot/sysroots/core2-64-pokysdk-linux.



I make it because config file in host-sysroot as /opt/poky/2.7+snapshot/sysroots/x86_64-pokysdk-linux  will be covered by another ARCH.

For example, first install SDK for x86_64, and next install SDK for x86, as host-sysroot is same, the same config file will be covered. In that case config settings for x86_64 will be inefficacy.



To resolve that problem, I put config file in target-sysroot like /opt/poky/2.7+snapshot/sysroots/core2-64-poky-linux. As each ARCH has its own target-sysroot, config file will not be covered.


That was also why I put config file in meta-environment in last patch.

->What do these two sed commands do? If we create /etc/rpmrc just above, can it have the right content from the beginning?

Well, in the environment in Yocto Build system, the value of ${PACKAGE_ARCHS} include “–nativesdk” as not needed in SDK environment.
And the ARCH name of core2-64 rpm is core2_64 like rpm-4.14.2.1-r0.core2_64.rpm.
So I modify the ARCH name in etc/rpmrc.

--------------------------------------------------
Zheng Ruoqin
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)
ADDR.: No.6 Wenzhu Road, Software Avenue,
       Nanjing, 210012, China
MAIL : zhengrq.fnst at cn.fujistu.com

From: Alexander Kanavin [mailto:alex.kanavin at gmail.com]
Sent: Monday, September 09, 2019 7:07 PM
To: Zheng, Ruoqin/郑 若钦 <zhengrq.fnst at cn.fujitsu.com>
Cc: OE-core <openembedded-core at lists.openembedded.org>
Subject: Re: [OE-core] [PATCH] rpm: make rpm work in toolchain.

On Mon, 9 Sep 2019 at 12:58, Zheng Ruoqin <zhengrq.fnst at cn.fujitsu.com<mailto:zhengrq.fnst at cn.fujitsu.com>> wrote:
         rm -rf ${D}/var
+        install -d ${D}/${SDKTARGETSYSROOT}/etc/rpm

Why not simply ${D}/etc/rpm?

+        sed -i 's/-nativesdk//g' ${D}/${SDKTARGETSYSROOT}/etc/rpmrc
+        sed -i 's/-/_/' ${D}/${SDKTARGETSYSROOT}/etc/rpmrc

What do these two sed commands do? If we create /etc/rpmrc just above, can it have the right content from the beginning?
                      "
+FILES_${PN}_append_class-nativesdk += "${SDKTARGETSYSROOT}"

Same question: why is ${SDKTARGETSYSROOT} needed? The configuration files should be in /etc, and rpm should be instructed to pick them up from there, same way as it is done for -native variant when building an image.

Alex


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20190909/d75df9c6/attachment-0001.html>


More information about the Openembedded-core mailing list