bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tic sometimes silently ignores the -o option


From: Thomas Dickey
Subject: Re: tic sometimes silently ignores the -o option
Date: Sat, 1 Jul 2023 14:29:22 -0400

On Sat, Jul 01, 2023 at 09:01:38PM +0200, Sven Joachim wrote:
> There are situations where tic silently ignores the -o option and writes

making it fail if the -o option is no good seems like an improvement

> to the default output directory (/etc/terminfo or ${HOME}/.terminfo)
> instead.

I've always found $HOME/.terminfo to be a nuisance,
but it's popular with users.

I have this (except when I have to work on _that_ feature):

$ ls -lad ~/.term*
drwxr-xr-x 2 tom users 4096 May 29  1994 /users/tom/.term
drwx------ 3 tom users 4096 May 18  2019 /users/tom/.terminator
-r-------- 1 tom users    0 Jul 31  1999 /users/tom/.terminfo
---------- 1 tom users    0 Oct 30  2011 /users/tom/.terminfo.db
-r--r--r-- 1 tom users 1017 Jul 31  1999 /users/tom/.terminfo.zip

Its use as a fallback for $TERMINFO is too well-established to "fix".

But limiting -o seems relatively low-impact.

> - If the output directory is not writable or cannot be created, e.g.
>   "tic -o /somedir myfile" or "tic -o /etc/terminfo myfile" as a normal
>   user.
> 
> Should tic fail or warn in such situations?
> 
> - If the output directory and its parent do not exist, e.g.
>   "tic -o /some/dir myfile" as root or as a normal user.
> 
> Should tic create missing parent directories?

probably not - imho it should only create its own subdirectories.

limiting it like that saves a lot of bug reports :-)

(people who _need_ to do that have "mkdir -p", whose effects are
more readily diagnosed -- though it _would_ be nice if mkdir had
a --dry-run option)
 
> For background, please see https://bugs.debian.org/1040048.  To the
> naive user it is certainly surprising that tic was asked to write to
> debian/di-utils-terminfo/lib/terminfo and complained about the totally
> different directory /sbuild-nonexistent/.terminfo.
> 
> Cheers,
>        Sven
> 

-- 
Thomas E. Dickey <dickey@invisible-island.net>
https://invisible-island.net

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]