Openembedded : How to reduce terminfo database footprint?

What can be a clean approach for openembedded to reduce terminfo database footprint?

/usr/share/terminfo is about 7M in size!

A lot of linux commands depend from ncurses so i can’t get rid of it.
I am not an ncurses specialist so i am not aware if i can configure preoperly ncurses without terminfo.

I goggled a bit and i found some approaches :

  • Write a brute ncurses.bbappend that strip data out after installation
  • Maybe load from terminfo.src only what you need ( not sure if it reduces the db actually )
  • Embed the definition you need into binaries through infocmp

Although this is not a specfic Toradex topic i think it can be useful to help users narrowing down their images.

It seems that the ncurses recipe already creates multiple packages:

There should be ncurses ncurses-tools, ncurses-terminfo and ncurses-terminfo-base. Maybe ncurses-terminfo-base is actually enough and you can get rid of ncurses-terminfo.

I dedicated some attempts to this option but i didn’t get a clear solution, maybe some dep issue.
Instead i modify the do_install() in the .inc preserving the /etc/terminfo subset and cleaning the /usr/share/terminfo full db, it seems to work and it’s enough at the time of writing.
I wiil dig into it later.