Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] rpm: fix rpm path in nativesdk
@ 2018-09-28  6:39 Zhaolong Zhang
  2018-09-28  7:51 ` Richard Purdie
  0 siblings, 1 reply; 2+ messages in thread
From: Zhaolong Zhang @ 2018-09-28  6:39 UTC (permalink / raw)
  To: openembedded-core, zhangzl2013

Fix the incorrect path inside the nativesdk 'rpmdeps' wrapper.
Also fix the hard coded path in 'find-provides' and 'find-provides' for nativesdk.

Signed-off-by: Zhaolong Zhang <zhangzl2013@126.com>
---
 meta/recipes-devtools/rpm/rpm_4.14.2.bb | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-devtools/rpm/rpm_4.14.2.bb b/meta/recipes-devtools/rpm/rpm_4.14.2.bb
index 46f8837..f22eee0 100644
--- a/meta/recipes-devtools/rpm/rpm_4.14.2.bb
+++ b/meta/recipes-devtools/rpm/rpm_4.14.2.bb
@@ -103,12 +103,15 @@ do_install_append_class-native() {
 do_install_append_class-nativesdk() {
         for tool in ${WRAPPER_TOOLS}; do
                 create_wrapper ${D}$tool \
-                        RPM_CONFIGDIR='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
-                        RPM_ETCCONFIGDIR='$'{RPM_ETCCONFIGDIR-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/..} \
-                        MAGIC='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/misc/magic.mgc \
+                        RPM_CONFIGDIR=$OECORE_NATIVE_SYSROOT/${libdir}/rpm \
+                        RPM_ETCCONFIGDIR=$OECORE_NATIVE_SYSROOT/${base_prefix} \
+                        MAGIC=$OECORE_NATIVE_SYSROOT/${datadir}/misc/magic.mgc \
                         RPM_NO_CHROOT_FOR_SCRIPTS=1
         done
 
+        sed -i -e 's:\/usr\/lib\/rpm\/:$OECORE_NATIVE_SYSROOT\/usr\/lib\/rpm\/:' ${D}${libdir}/rpm/find-provides
+        sed -i -e 's:\/usr\/lib\/rpm\/:$OECORE_NATIVE_SYSROOT\/usr\/lib\/rpm\/:' ${D}${libdir}/rpm/find-requires
+
         rm -rf ${D}/var
 }
 
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] rpm: fix rpm path in nativesdk
  2018-09-28  6:39 [PATCH] rpm: fix rpm path in nativesdk Zhaolong Zhang
@ 2018-09-28  7:51 ` Richard Purdie
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2018-09-28  7:51 UTC (permalink / raw)
  To: Zhaolong Zhang, openembedded-core

On Fri, 2018-09-28 at 14:39 +0800, Zhaolong Zhang wrote:
> Fix the incorrect path inside the nativesdk 'rpmdeps' wrapper.

Could you please elaborate on the commit message to say how its
incorrect, why does it need fixing?

I'm sure it does but its not obvious how/why...

Thanks,

Richard



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-09-28  7:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-28  6:39 [PATCH] rpm: fix rpm path in nativesdk Zhaolong Zhang
2018-09-28  7:51 ` Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox