public inbox for
help / color / mirror / Atom feed
Subject: gnats/384: mkdb should fail for a remote database
Date: Sun, 26 May 2002 06:21:00 -0000	[thread overview]
Message-ID: <> (raw)

>Number:         384
>Category:       gnats
>Synopsis:       mkdb should fail for a remote database
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun May 26 09:18:30 -0400 2002
>Originator:     Lars Henriksen
>Release:        4.0-beta1


The databases file may describe local as well as remote databases.
The mkdb command should only work for local databases.
At present the last field of the database entry is used unconditionally.
Minimal fix attached.

RCS file: /cvsroot/gnats/gnats/gnats/,v
retrieving revision 1.7
diff -u -r1.7
---     2 Dec 2001 14:39:09 -0000       1.7
+++     26 May 2002 12:56:21 -0000
@@ -58,10 +58,10 @@
     exit 1;
-dbdir=`grep "^${database}:" $DATABASES | sed 's/^.*:\([^:]*\)$/\1/'`
+dbdir=`grep "^${database}:" $DATABASES | sed -n 's/^'${database}':[^:]*:\([^:]*\)$/\1/p'`
 if [ -z "${dbdir}" ]
-  echo "$prog: No proper entry for \`${database}' in \`$DATABASES'."
+  echo "$prog: No proper entry for \`${database}' in \`$DATABASES':\n"`grep "^${database}:" $DATABASES`
   exit 1

Gnats-prs mailing list

                 reply	other threads:[~2002-05-26 13:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

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

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

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).