On Monday, November 16th, 2026 at 8:02 AM, 
Gavin Smith <[email protected]> wrote:

> On Sun, Nov 15, 2026 at 04:03:15PM +0100, Patrice Dumas wrote:
> > On Sun, Nov 15, 2026 at 01:53:43PM +0000, Gavin Smith wrote:
> > > I suspect that texi2any is a symbolic link although I have no idea where
> > > the -real suffix comes from.
> >
> > That is probably it.  How about not resetting $real_command_name if
> > following a link to find Texinfo::ModulePath?  I attach a patch that
> > does that.  Something imilar would probably need to be done for
> > ctexi2any.
> >
> 
> The -real suffix seems to be a Guix thing:
> 
>     For a package writer, the goal is to make sure commands always work the
>     same rather than depend on some external settings. One way to achieve
>     that is to wrap commands in a thin script that sets those environment
>     variables, thereby ensuring that those run-time dependencies are always
>     found.
> 
>     ...
> 
>     For example, this call:
> 
>         (wrap-program "foo"
>                       '("PATH" ":" = ("/gnu/.../bar/bin"))
>                       '("CERT_PATH" suffix ("/gnu/.../baz/certs"
>                                             "/qux/certs")))
> 
>     will copy foo to .foo-real and create the file foo with the following 
> contents:
> 
>         #!location/of/bin/bash
>         export PATH="/gnu/.../bar/bin"
>         export 
> CERT_PATH="$CERT_PATH${CERT_PATH:+:}/gnu/.../baz/certs:/qux/certs"
>         exec -a $0 location/of/.foo-real "$@"
> 
> https://guix.gnu.org/manual/1.4.0/en/guix.html#Wrappers
> 
> I am not sure if there is anything we can do.  Surely texi2any cannot
> be the only program with this issue with this Guix feature.
> 
> The GNU Coding Standards say that the output of --version shouldn't depend
> on argv[0], and indeed the output of "texi2any --version" is the same as
> the output of "makeinfo --version" - always reporting the name of the
> program as "texi2any (GNU texinfo)".

I do not see the problem with the above.  But for examples where users actually
input the syntax for running the program, should follow the name, not internal 
equivalents. 
 
> However, as far as I could tell the GNU Coding Standards do not say anything
> about the output of --help, so we would be free to hardcode "texi2any" or
> "makeinfo" in the output of --help, if we thought that was a good idea.

The --help output should use the name the user invoked - texi2any or makeinfo -
rather than always hard-coding one name.  It still can mention that makeinfo is 
an alias for texi2any.

> However, I don't think this change is justified for the sake of this Guix
> feature, as it is more useful to be able to report the name of the program
> it is run by in the --help message.  (For example, there might be a version
> suffix so someone might have a program installed by the name of 
> "texi2any-7.3".
 
Report the name of the program it is run by in the --help examples is a bad 
idea.
Reporting that it is an alias and texi2any can be used instead, is acceptable -
but only as a comment, not as examples users run.  


Reply via email to