On 2/27/24 17:37, Alexander Kanavin wrote:
CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know 
the content is safe.

On Tue, 27 Feb 2024 at 08:10, Changqing Li
<changqing...@eng.windriver.com>  wrote:
+
+       install -d ${D}/${sysconfdir}
+       install -m 0644 ${S}/doc/etc/rxvt-unicode.terminfo 
${D}/${sysconfdir}/rxvt-unicode.terminfo
+}
+
+RDEPENDS:${PN} = "ncurses-tools"
+PACKAGE_WRITE_DEPS += "qemu-native"
+pkg_postinst:${PN} () {
+       if [ -n "$D" ]; then
+               if ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 
'true', 'false', d)}; then
+                       outdir=$(${@qemu_run_binary(d, '$D', '${bindir}/tic')} -D 2>&1 | 
sed -n "2p" | awk '{ print $2 }')
+                       ${@qemu_run_binary(d, '$D', '${bindir}/tic')} -x 
${sysconfdir}/rxvt-unicode.terminfo -o $D$outdir
+               fi
+       fi
  }
I would really prefer to make native tic do the right thing, if the
only problem is that it installs the needed items into the wrong
location.

Yes, the wrong location is the only problem. V4 patch is a way to make native tic install to  a right location.

but this solution (hardcode output dir to $(DESTDIR)$(datadir)/terminfo) is rejected by upstream.

if use V4 patch,  we need to make it an oe specific patch.


upstream said that to it is better to use target tic to generate the terminfo to make sure ncurses in the

target environment can get the correct terminfo. That's why I changed to use target tic. but we do will met

"some targets don't support usermode" problem.

So what's your suggestion about this? use V4 patch?

if you think the hardcode path $(DESTDIR)$(datadir)/terminfo) is not good in v4,  I can do some change for V4.

Since native tic and target tic is from the same recipe, the TERMINFO should be the same except native tic is under ${RECIPE_SYSROOT_NATIVE}.

how about like what I did in this patch,  get the native outputdir from native tic, cut ${RECIPE_SYSROOT_NATIVE} to get target outputdir, then pass it to nativetic .. -o  ${DESTDIR}${target outputdir}

//Changqing


qemu usermode is notoriously brittle, and isn't available on some
targets at all.

Alex
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#196318): 
https://lists.openembedded.org/g/openembedded-core/message/196318
Mute This Topic: https://lists.openembedded.org/mt/104598938/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