Re: [PATCH] check for ctags utility in make_ctags

From: Nikolay Shaplov <dhyan(at)nataraj(dot)su>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Витус Вагнер <vitus(at)wagner(dot)pp(dot)ru>
Subject: Re: [PATCH] check for ctags utility in make_ctags
Date: 2019-01-06 12:42:20
Message-ID: 96675367.WEgyTzNvEp@x200m
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

В письме от четверг, 3 января 2019 г. 12:52:36 MSK пользователь Peter
Eisentraut написал:

> >> +1, let's keep it simple. I would just use "ctags/etags not found"
> >> as error message.
> >
> > Actually I was trying to say "Please install 'ctags' [utility] to run
> > make_ctags". But if all of you read it as "Please install 'ctags'
> > [package] to run make_ctags", then it is really better to drop the
> > advice.
> >
> > So I removed it. See the patch.
>
> A few more comments.
>
> I don't know how portable command -v is. Some systems have a /bin/sh
> that is pre-POSIX. Same with $(...).
Do you know how to obtain such a shell in Debian? I have dash for sh, and it
knows both commands -v and $(). And I have no idea how to get more simple one.
Do you have one?

Do you know the way how to check if shell is pre-POSIX and just disable the
check in this case.

Or can you offer some another check that will satisfy you as a potential user
of pre-POSIX shell? The check that will somehow report that ctags _executable_
file is missing.

> If etags is not installed, the current script prints
>
> xargs: etags: No such file or directory

make_ctags prints

xargs: ctags: No such file or directory
sort: cannot read: tags: No such file or directory

For me it is not good enough error message, it says it can't find some ctags|
etags file. But says nothing that is is an utility, that is missing...

So I would try to find better way to report that ctags utility is missing.

PS Vitus, I added you to CC, because I know that you are quite good in bash
scripting, may be you would give some good ideas I do not have.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2019-01-06 12:49:47 Re: Remove Deprecated Exclusive Backup Mode
Previous Message Surafel Temesgen 2019-01-06 11:59:05 Re: START/END line number for COPY FROM