pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nikolay Shaplov <dhyan@nataraj.su>
To: pgsql-hackers@lists.postgresql.org
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Subject: Re: [PATCH] check for ctags utility in make_ctags
Date: Thu, 03 Jan 2019 14:15:11 +0300
Message-ID: <2205856.meAnofT0VS@x200m> (raw)
In-Reply-To: <20190103010353.GA1442@paquier.xyz>
References: <2394207.ccz7JgCJsh@x200m>
	<4273.1546446946@sss.pgh.pa.us>
	<20190103010353.GA1442@paquier.xyz>

В письме от четверг, 3 января 2019 г. 10:03:53 MSK пользователь Michael 
Paquier написал:
> On Wed, Jan 02, 2019 at 11:35:46AM -0500, Tom Lane wrote:
> > In fact, that's demonstrably not so: on my RHEL6 and Fedora boxes,
> > /usr/bin/etags isn't owned by any package, because it's a symlink
> > managed by the "alternatives" system.  It points to /usr/bin/etags.emacs
> > which is owned by the emacs-common package.  So dropping the advice
> > about how to fix the problem seems like a good plan.
> 
> +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.

Attachments:

  [text/x-patch] check-for-ctags-in-make_ctags_v4.diff (675B, ../2205856.meAnofT0VS@x200m/2-check-for-ctags-in-make_ctags_v4.diff)
  download | inline diff:
diff --git a/src/tools/make_ctags b/src/tools/make_ctags
index 1609c07..0834468 100755
--- a/src/tools/make_ctags
+++ b/src/tools/make_ctags
@@ -2,6 +2,12 @@
 
 # src/tools/make_ctags
 
+if [ ! $(command -v ctags) ]
+then
+  echo "'ctags' utility is not found" 1>&2
+  exit 1
+fi
+
 trap "rm -f /tmp/$$" 0 1 2 3 15
 rm -f ./tags
 
diff --git a/src/tools/make_etags b/src/tools/make_etags
index 3ce96bc..cb44aed 100755
--- a/src/tools/make_etags
+++ b/src/tools/make_etags
@@ -2,6 +2,12 @@
 
 # src/tools/make_etags
 
+if [ ! $(command -v etags) ]
+then
+  echo "'etags' utility is not found" 1>&2
+  exit 1
+fi
+
 rm -f ./TAGS
 
 find `pwd`/ -type f -name '*.[chyl]' -print |

view thread (14+ messages)  latest in thread

Message-ID: <2205856.meAnofT0VS@x200m>
Permalink:  ../2205856.meAnofT0VS@x200m/
Also on:    postgresql.org/message-id/2205856.meAnofT0VS@x200m

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: dhyan@nataraj.su, pgsql-hackers@lists.postgresql.org, michael@paquier.xyz, tgl@sss.pgh.pa.us, peter.eisentraut@2ndquadrant.com
  Subject: Re: [PATCH] check for ctags utility in make_ctags
  In-Reply-To: <2205856.meAnofT0VS@x200m>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox