summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Whitlock <gentoo@mattwhitlock.name>2022-10-27 08:53:05 -0400
committerMike Gilbert <floppym@gentoo.org>2022-11-05 22:57:51 -0400
commit55054c304dbdfbdce6cfa5555fa26bfd0066a1df (patch)
tree46ff7a54db078be97b1a3ec655aa43a4d3d7384e /sys-libs/ncurses
parentapp-i18n/yaskkserv2: drop old (diff)
downloadgentoo-55054c304dbdfbdce6cfa5555fa26bfd0066a1df.tar.gz
gentoo-55054c304dbdfbdce6cfa5555fa26bfd0066a1df.tar.bz2
gentoo-55054c304dbdfbdce6cfa5555fa26bfd0066a1df.zip
sys-libs/ncurses: don't populate /etc/terminfo/ when USE="-split-usr"
The rationale for moving the terminfo files for some common terminals into /etc/terminfo/ was stated in bug #37026: "ncurses, unlike termcap, stores its terminfo database in '/usr/share'... which may not be available until all file systems are mounted." With merged-/usr this is no longer a concern, and, moreover, moving some terminfo files out into /etc undermines a core motivation of merged-/usr, which is to situate a complete system image within /usr. This commit preserves the existing behavior when USE="split-usr" but eliminates the move of common terminfo files into /etc/terminfo/ when USE="-split-usr". Signed-off-by: Matt Whitlock <gentoo@mattwhitlock.name> Closes: https://github.com/gentoo/gentoo/pull/27988 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'sys-libs/ncurses')
-rw-r--r--sys-libs/ncurses/ncurses-6.3_p20220924-r1.ebuild47
-rw-r--r--sys-libs/ncurses/ncurses-6.3_p20220924.ebuild47
2 files changed, 54 insertions, 40 deletions
diff --git a/sys-libs/ncurses/ncurses-6.3_p20220924-r1.ebuild b/sys-libs/ncurses/ncurses-6.3_p20220924-r1.ebuild
index f9e5093a7eb1..d7f85fe0f003 100644
--- a/sys-libs/ncurses/ncurses-6.3_p20220924-r1.ebuild
+++ b/sys-libs/ncurses/ncurses-6.3_p20220924-r1.ebuild
@@ -415,8 +415,6 @@ multilib_src_install() {
}
multilib_src_install_all() {
- # We need the basic terminfo files in /etc for embedded/recovery, bug #37026
- einfo "Installing basic terminfo files in /etc..."
local terms=(
# Dumb/simple values that show up when using the in-kernel VT.
ansi console dumb linux
@@ -430,25 +428,34 @@ multilib_src_install_all() {
screen{,-256color}
screen.xterm-256color
)
- local x
- for x in "${terms[@]}"; do
- local termfile=$(find "${ED}"/usr/share/terminfo/ -name "${x}" 2>/dev/null)
- local basedir=$(basename "$(dirname "${termfile}")")
-
- if [[ -n ${termfile} ]] ; then
- dodir "/etc/terminfo/${basedir}"
- mv "${termfile}" "${ED}/etc/terminfo/${basedir}/" || die
- dosym "../../../../etc/terminfo/${basedir}/${x}" \
- "/usr/share/terminfo/${basedir}/${x}"
- fi
- done
-
- echo "CONFIG_PROTECT_MASK=\"/etc/terminfo\"" | newenvd - 50ncurses
+ if use split-usr ; then
+ local x
+ # We need the basic terminfo files in /etc for embedded/recovery, bug #37026
+ einfo "Installing basic terminfo files in /etc..."
+ for x in "${terms[@]}"; do
+ local termfile=$(find "${ED}"/usr/share/terminfo/ -name "${x}" 2>/dev/null)
+ local basedir=$(basename "$(dirname "${termfile}")")
+
+ if [[ -n ${termfile} ]] ; then
+ dodir "/etc/terminfo/${basedir}"
+ mv "${termfile}" "${ED}/etc/terminfo/${basedir}/" || die
+ dosym "../../../../etc/terminfo/${basedir}/${x}" \
+ "/usr/share/terminfo/${basedir}/${x}"
+ fi
+ done
- use minimal && rm -r "${ED}"/usr/share/terminfo*
- # Because ncurses5-config --terminfo returns the directory we keep it
- # bug #245374
- keepdir /usr/share/terminfo
+ echo "CONFIG_PROTECT_MASK=\"/etc/terminfo\"" | newenvd - 50ncurses
+
+ use minimal && rm -r "${ED}"/usr/share/terminfo*
+ # Because ncurses5-config --terminfo returns the directory we keep it
+ # bug #245374
+ keepdir /usr/share/terminfo
+ elif use minimal ; then
+ # Keep only the basic terminfo files
+ find "${ED}"/usr/share/terminfo/ \
+ -type f ${terms[*]/#/! -name } -delete , \
+ -type d -empty -delete || die
+ fi
cd "${S}" || die
dodoc ANNOUNCE MANIFEST NEWS README* TO-DO doc/*.doc
diff --git a/sys-libs/ncurses/ncurses-6.3_p20220924.ebuild b/sys-libs/ncurses/ncurses-6.3_p20220924.ebuild
index 9a7f05e0fcb6..9ff5fd9601d3 100644
--- a/sys-libs/ncurses/ncurses-6.3_p20220924.ebuild
+++ b/sys-libs/ncurses/ncurses-6.3_p20220924.ebuild
@@ -413,8 +413,6 @@ multilib_src_install() {
}
multilib_src_install_all() {
- # We need the basic terminfo files in /etc for embedded/recovery, bug #37026
- einfo "Installing basic terminfo files in /etc..."
local terms=(
# Dumb/simple values that show up when using the in-kernel VT.
ansi console dumb linux
@@ -428,25 +426,34 @@ multilib_src_install_all() {
screen{,-256color}
screen.xterm-256color
)
- local x
- for x in "${terms[@]}"; do
- local termfile=$(find "${ED}"/usr/share/terminfo/ -name "${x}" 2>/dev/null)
- local basedir=$(basename "$(dirname "${termfile}")")
-
- if [[ -n ${termfile} ]] ; then
- dodir "/etc/terminfo/${basedir}"
- mv "${termfile}" "${ED}/etc/terminfo/${basedir}/" || die
- dosym "../../../../etc/terminfo/${basedir}/${x}" \
- "/usr/share/terminfo/${basedir}/${x}"
- fi
- done
-
- echo "CONFIG_PROTECT_MASK=\"/etc/terminfo\"" | newenvd - 50ncurses
+ if use split-usr ; then
+ local x
+ # We need the basic terminfo files in /etc for embedded/recovery, bug #37026
+ einfo "Installing basic terminfo files in /etc..."
+ for x in "${terms[@]}"; do
+ local termfile=$(find "${ED}"/usr/share/terminfo/ -name "${x}" 2>/dev/null)
+ local basedir=$(basename "$(dirname "${termfile}")")
+
+ if [[ -n ${termfile} ]] ; then
+ dodir "/etc/terminfo/${basedir}"
+ mv "${termfile}" "${ED}/etc/terminfo/${basedir}/" || die
+ dosym "../../../../etc/terminfo/${basedir}/${x}" \
+ "/usr/share/terminfo/${basedir}/${x}"
+ fi
+ done
- use minimal && rm -r "${ED}"/usr/share/terminfo*
- # Because ncurses5-config --terminfo returns the directory we keep it
- # bug #245374
- keepdir /usr/share/terminfo
+ echo "CONFIG_PROTECT_MASK=\"/etc/terminfo\"" | newenvd - 50ncurses
+
+ use minimal && rm -r "${ED}"/usr/share/terminfo*
+ # Because ncurses5-config --terminfo returns the directory we keep it
+ # bug #245374
+ keepdir /usr/share/terminfo
+ elif use minimal ; then
+ # Keep only the basic terminfo files
+ find "${ED}"/usr/share/terminfo/ \
+ -type f ${terms[*]/#/! -name } -delete , \
+ -type d -empty -delete || die
+ fi
cd "${S}" || die
dodoc ANNOUNCE MANIFEST NEWS README* TO-DO doc/*.doc