On 2011-12-28 10:45 +0100, Sven Joachim wrote:
> Package: libtinfo5
> Version: 5.9-4
> Severity: normal
>
> Configuring ncurses --with-default-terminfo-dir=/usr/share/terminfo, as
> we have been doing since 5.7+20100313-1, has the unfortunate side effect
> that tic(1) writes to /usr/share/terminfo instead of /etc/terminfo by
> default when run as root (overridable with the -o option).
>
> I'm reluctant to revert the change, since that would mean reintroducing
> bug #509919.
Looking closer, it seems to me I have now found the root cause of
#509919. In misc/gen-edit.sh, the tabset directory is computed from the
default terminfo directory, but misc/Makefile.in actually installs the
tabset files into ${datadir}/tabset which is not necessarily the same
place.
The following patch removes this discrepancy and seems to DTRT:
--8<---------------cut here---------------start------------->8---
diff --git a/misc/Makefile.in b/misc/Makefile.in
index 14c8e95..2d88848 100644
--- a/misc/Makefile.in
+++ b/misc/Makefile.in
@@ -120,7 +120,7 @@ terminfo.tmp : run_tic.sed $(source)
run_tic.sed :
WHICH_XTERM=@WHICH_XTERM@ \
- ticdir=${ticdir} \
+ datadir=${datadir} \
$(SHELL) $(srcdir)/gen_edit.sh >$@
$(DESTDIR)$(bindir) \
diff --git a/misc/gen_edit.sh b/misc/gen_edit.sh
index e9b3390..e03028d 100755
--- a/misc/gen_edit.sh
+++ b/misc/gen_edit.sh
@@ -37,12 +37,12 @@
# The leaf directory names (lib, tabset, terminfo)
#
-: ${ticdir=@TERMINFO@}
+: ${datadir=@datadir@}
: ${xterm_new=@WHICH_XTERM@}
# If we're not installing into /usr/share/, we'll have to adjust the location
# of the tabset files in terminfo.src (which are in a parallel directory).
-TABSET=`echo $ticdir | sed -e 's%/terminfo$%/tabset%'`
+TABSET=${datadir}/tabset
if test "x$TABSET" != "x/usr/share/tabset" ; then
cat <<EOF
s%/usr/share/tabset%$TABSET%g
--8<---------------cut here---------------end--------------->8---
Thomas, what do you think of that?
Cheers,
Sven
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]