On 2014/06/17 11:57, Erling Westenvik wrote:
> On Tue, Jun 17, 2014 at 12:00:41AM -0400, Eduardo Lopes wrote:
> > On installing vim (gtk2 flavor) from snapshots I'v got the following
> > message:
> > 
> > /usr/local/man//mandoc.db: unable to open database file
> 
> I've received similar messages from various ports lately. Like right
> now on amd64 current:
> 
> icedtea-web-1.4.2p0: ok
> --- +jdk-1.7.0.55p1v0 -------------------
> You may wish to add /usr/local/jdk-1.7.0/man to /etc/man.conf
> /usr/local/jdk-1.7.0/man//mandoc.db: unable to open database file
> 

This happens every time a package installs a manpage in a new path
that doesn't already have a mandoc.db file.

Needs squelching somewhere, could be in pkg_add, but I think mandocdb
would be a better place. Ingo, what do you think about this diff?

Index: mandocdb.c
===================================================================
RCS file: /cvs/src/usr.bin/mandoc/mandocdb.c,v
retrieving revision 1.107
diff -u -p -r1.107 mandocdb.c
--- mandocdb.c  5 Jun 2014 07:13:53 -0000       1.107
+++ mandocdb.c  17 Jun 2014 21:39:53 -0000
@@ -2223,7 +2223,8 @@ dbopen(int real)
                rc = sqlite3_open_v2(MANDOC_DB, &db, ofl, NULL);
                if (SQLITE_OK != rc) {
                        exitcode = (int)MANDOCLEVEL_SYSERR;
-                       say(MANDOC_DB, "%s", sqlite3_errstr(rc));
+                       if (SQLITE_CANTOPEN != rc)
+                               say(MANDOC_DB, "%s", sqlite3_errstr(rc));
                        return(0);
                }
                goto prepare_statements;

Reply via email to