diff options
author | Colin Watson <cjwatson@debian.org> | 2022-10-18 00:24:37 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2022-10-18 00:24:38 +0100 |
commit | 71aefedddd2c1156c5cea8ebd27debc4e23b458a (patch) | |
tree | fde6d4b0ec06accf7cf74bc55996d359b2b2acc0 | |
parent | 09304c00a4a3dea95da5d1f0aa1ad4c20c292f3b (diff) |
Add 3type to default section list
This is used by the Linux man-pages package, and should be lower
priority than section 2. Suggested by Alejandro Colomar.
Fixes https://gitlab.com/cjwatson/man-db/-/issues/5.
* include/manconfig.h (STD_SECTIONS): Add `3type` between sections `2`
and `5`.
* m4/man-arg-sections.m4 (MAN_ARG_SECTIONS): Likewise.
* man/man5/manpath.man5 (FORMAT): Update documentation of SECTION.
* src/tests/man-exact-section-matches: Update default section order.
* src/man_db.conf.in (SECTION): Update documentation.
* NEWS.md: Document this.
-rw-r--r-- | NEWS.md | 5 | ||||
-rw-r--r-- | include/manconfig.h | 3 | ||||
-rw-r--r-- | m4/man-arg-sections.m4 | 6 | ||||
-rw-r--r-- | man/man5/manpath.man5 | 2 | ||||
-rw-r--r-- | src/man_db.conf.in | 2 | ||||
-rwxr-xr-x | src/tests/man-exact-section-matches | 2 |
6 files changed, 13 insertions, 7 deletions
@@ -6,6 +6,11 @@ Fixes: * SECURITY: Escape `$` characters in page names when constructing `less` prompts. Note that this requires `less` >= 457 (released in 2012). +Improvements: + + * Add section `3type` to the default section list just after `2`. This is + used by the Linux man-pages package. + man-db 2.11.0 (15 October 2022) =============================== diff --git a/include/manconfig.h b/include/manconfig.h index 4f2caea5..8de135f9 100644 --- a/include/manconfig.h +++ b/include/manconfig.h @@ -32,7 +32,8 @@ avoided. */ #define STD_SECTIONS { \ - "1", "n", "l", "8", "3", "0", "2", "5", "4", "9", "6", "7", NULL \ + "1", "n", "l", "8", "3", "0", "2", "3type", "5", "4", "9", "6", "7", \ + NULL \ } /* Some system's man pages require default pre-processing with perhaps tbl diff --git a/m4/man-arg-sections.m4 b/m4/man-arg-sections.m4 index 6d97e6e9..20441b39 100644 --- a/m4/man-arg-sections.m4 +++ b/m4/man-arg-sections.m4 @@ -1,17 +1,17 @@ -# man-arg-sections.m4 serial 2 +# man-arg-sections.m4 serial 3 dnl MAN_ARG_SECTIONS dnl Add a --with-sections option. AC_DEFUN([MAN_ARG_SECTIONS], [ AC_ARG_WITH([sections], -[AS_HELP_STRING([--with-sections=SECTIONS], [use manual page sections SECTIONS @<:@1 n l 8 3 0 2 5 4 9 6 7@:>@])], +[AS_HELP_STRING([--with-sections=SECTIONS], [use manual page sections SECTIONS @<:@1 n l 8 3 0 2 3type 5 4 9 6 7@:>@])], [if test "$withval" = "yes" || test "$withval" = "no" then AC_MSG_ERROR([--with-sections requires an argument]) else sections="$withval" fi], - [: ${sections=1 n l 8 3 0 2 5 4 9 6 7}]) + [: ${sections=1 n l 8 3 0 2 3type 5 4 9 6 7}]) AC_SUBST([sections])dnl ]) diff --git a/man/man5/manpath.man5 b/man/man5/manpath.man5 index 0ea293f9..151ebb74 100644 --- a/man/man5/manpath.man5 +++ b/man/man5/manpath.man5 @@ -192,7 +192,7 @@ directives in the configuration file, the default is: .PP .RS .nf -.if !'po4a'hide' SECTION 1 n l 8 3 0 2 5 4 9 6 7 +.if !'po4a'hide' SECTION 1 n l 8 3 0 2 3type 5 4 9 6 7 .fi .RE .PP diff --git a/src/man_db.conf.in b/src/man_db.conf.in index 042fc599..3bb8ebd2 100644 --- a/src/man_db.conf.in +++ b/src/man_db.conf.in @@ -100,7 +100,7 @@ MANDB_MAP @snapdir@/man /var/cache/man/snap #DEFINE apropos_regex_grep_flags -iE #--------------------------------------------------------- # Section names. Manual sections will be searched in the order listed here; -# the default is 1, n, l, 8, 3, 0, 2, 5, 4, 9, 6, 7. Multiple SECTION +# the default is 1, n, l, 8, 3, 0, 2, 3type, 5, 4, 9, 6, 7. Multiple SECTION # directives may be given for clarity, and will be concatenated together in # the expected way. # If a particular extension is not in this list (say, 1mh), it will be diff --git a/src/tests/man-exact-section-matches b/src/tests/man-exact-section-matches index 3f74febf..783796e3 100755 --- a/src/tests/man-exact-section-matches +++ b/src/tests/man-exact-section-matches @@ -24,7 +24,7 @@ export MANPATH # Force default section order. cat >>"$tmpdir/manpath.config" <<EOF -SECTION 1 n l 8 3 0 2 5 4 9 6 7 +SECTION 1 n l 8 3 0 2 3type 5 4 9 6 7 EOF write_page md5sum 3pm "$tmpdir/usr/share/man/man3/open.3pm.gz" \ |