summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2014-09-01 23:47:57 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2014-09-01 23:47:57 +0000
commite45875c48ccbaeb8c52fbf3c57260e4ee3f9d076 (patch)
tree935a41bb5d5334d077819dacae09541a7aa9c0fe /usr.bin
parent7cde2405a7f09b099c380efeadb9b37b3fd4889b (diff)
When makewhatis(8) finds an .so link after the manual being pointed to
has already been processed, add the file names to the names table, too, not just to the mlinks table. This fixes a bug where apropos(1) and the new man(1) wouldn't find some of the Xenocara manuals via some of their .so links. After rebuilding, run "makewhatis /usr/X11R6/man" or just wait for weekly(8).
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/mandoc/mandocdb.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.bin/mandoc/mandocdb.c b/usr.bin/mandoc/mandocdb.c
index 4175b0fcbc9..d335b051529 100644
--- a/usr.bin/mandoc/mandocdb.c
+++ b/usr.bin/mandoc/mandocdb.c
@@ -1,4 +1,4 @@
-/* $Id: mandocdb.c,v 1.114 2014/08/23 01:00:20 doug Exp $ */
+/* $Id: mandocdb.c,v 1.115 2014/09/01 23:47:56 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -1973,6 +1973,13 @@ dbadd_mlink(const struct mlink *mlink)
SQL_BIND_INT64(stmts[STMT_INSERT_LINK], i, mlink->mpage->pageid);
SQL_STEP(stmts[STMT_INSERT_LINK]);
sqlite3_reset(stmts[STMT_INSERT_LINK]);
+
+ i = 1;
+ SQL_BIND_INT64(stmts[STMT_INSERT_NAME], i, NAME_FILE);
+ SQL_BIND_TEXT(stmts[STMT_INSERT_NAME], i, mlink->name);
+ SQL_BIND_INT64(stmts[STMT_INSERT_NAME], i, mlink->mpage->pageid);
+ SQL_STEP(stmts[STMT_INSERT_NAME]);
+ sqlite3_reset(stmts[STMT_INSERT_NAME]);
}
/*