openembedded-core.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
From: Rasmus Villemoes <ravi@prevas.dk>
To: openembedded-core@lists.openembedded.org
Cc: Paul Barker <paul@pbarker.dev>, Sam James <sam@gentoo.org>,
	Rasmus Villemoes <ravi@prevas.dk>
Subject: [PATCH v2] ncurses: stop moving terminfo files from /usr/share to /etc
Date: Thu, 30 Jul 2026 22:35:57 +0200	[thread overview]
Message-ID: <20260730203557.620819-1-ravi@prevas.dk> (raw)

From: Rasmus Villemoes <ravi@prevas.dk>

Why it is done that way is mostly lost in history. The gentoo
reference leads one to [1] and then to [2]. But the small set of
terminfo files needed for "recovery" or an initramfs or similar is
exactly what we're putting in the terminfo-base package, there is no
need for those files to not just stay under /usr/share.

This also drops the xterm -> xterm-color symlink. I don't think that
symlink is appropriate nowadays either, as running

  infocmp -L -d xterm xterm-color

shows that "xterm" (aka xterm-new, aka xterm-p370) has far more
capabilities than "xterm-color". So instead, just add plain 'xterm' to
the TERMINFO_BASE variable. Incidentally, gentoo had xterm in their
"basic" list as of their initial git commit 10 years ago [3].

Moreover, as the xterm -> xterm-color symlink only existed under /etc,
people who install the full ncurses-terminfo would have a
/usr/share/terminfo/x/xterm which did not match /etc/terminfo/x/xterm,
and which one an application would pick up is not obvious.

[1]
https://codeberg.org/gentoo/gentoo/src/commit/bebd3a1055b402d62afced244235e6fc4917cbd2/sys-libs/ncurses/ncurses-6.6_p20260411.ebuild#L414
[2] https://bugs.gentoo.org/37026
[3] https://codeberg.org/gentoo/gentoo/src/commit/56bd759df1d0c750a065b8c845e93d5dfa6b549d/sys-libs/ncurses/ncurses-5.9-r3.ebuild

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
---

v2: Updated commit message, replacing incorrect gentoo reference with
somewhat better researched ones.

This was originally a 2-patch series, patch 1/2 is already applied to
master as 9aee6b23a9 ("ncurses: put symlinks to basic terminfo files
in ncurses-terminfo-base package").

 meta/recipes-core/ncurses/ncurses.inc | 24 +-----------------------
 1 file changed, 1 insertion(+), 23 deletions(-)

diff --git a/meta/recipes-core/ncurses/ncurses.inc b/meta/recipes-core/ncurses/ncurses.inc
index 8fff9a226f..89668be363 100644
--- a/meta/recipes-core/ncurses/ncurses.inc
+++ b/meta/recipes-core/ncurses/ncurses.inc
@@ -162,7 +162,7 @@ _install_cfgs = "\
 "
 
 TERMINFO_BASE = "alacritty ansi console dumb linux rxvt screen screen-256color sun \
-  tmux tmux-256color vt52 vt100 vt102 vt200 vt220 xterm-color xterm-xfree86 xterm-256color"
+  tmux tmux-256color vt52 vt100 vt102 vt200 vt220 xterm xterm-color xterm-xfree86 xterm-256color"
 
 do_install() {
         # Order of installation is important; widec installs a 'curses.h'
@@ -183,27 +183,6 @@ do_install() {
 
         cd narrowc
 
-        # include some basic terminfo files
-        # stolen ;) from gentoo and modified a bit
-        for x in ${TERMINFO_BASE}
-        do
-                local termfile="$(find "${D}${datadir}/terminfo/" -name "${x}" 2>/dev/null)"
-                local basedir="$(basename $(dirname "${termfile}"))"
-
-                if [ -n "${termfile}" ]
-                then
-                        install -d ${D}${sysconfdir}/terminfo/${basedir}
-                        mv ${termfile} ${D}${sysconfdir}/terminfo/${basedir}/
-                        ln -s /etc/terminfo/${basedir}/${x} \
-                                ${D}${datadir}/terminfo/${basedir}/${x}
-                fi
-        done
-        # i think we can use xterm-color as default xterm
-        if [ -e ${D}${sysconfdir}/terminfo/x/xterm-color ]
-        then
-                ln -sf xterm-color ${D}${sysconfdir}/terminfo/x/xterm
-        fi
-
         # create linker scripts for libcurses.so and libncurses to
         # link against -ltinfo when needed. Some builds might break
         # else when '-Wl,--no-copy-dt-needed-entries' has been set in
@@ -311,7 +290,6 @@ FILES:${PN}-terminfo = "\
 "
 
 FILES:${PN}-terminfo-base = "\
-  ${sysconfdir}/terminfo \
   ${@' '.join(map(lambda x: '${datadir}/terminfo/'+x[0]+'/'+x, '${TERMINFO_BASE}'.split()))} \
 "
 
-- 
2.55.0



                 reply	other threads:[~2026-07-30 20:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260730203557.620819-1-ravi@prevas.dk \
    --to=ravi@prevas.dk \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=paul@pbarker.dev \
    --cc=sam@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).