Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Mar 2017 10:56:19 +0000 (UTC)
From:      Tijl Coosemans <tijl@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r315142 - head/usr.bin/man
Message-ID:  <201703121056.v2CAuJ3T001001@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tijl
Date: Sun Mar 12 10:56:19 2017
New Revision: 315142
URL: https://svnweb.freebsd.org/changeset/base/315142

Log:
  - Remove separate handling of /bin and /usr/bin in manpath.  They are no
    longer a special case.
  - Prefer PREFIX/share/man over PREFIX/man.
  - Add /usr/local/share/man to man_default_path.
  - Update manpath man page.
  
  Reviewed by:	bapt

Modified:
  head/usr.bin/man/man.sh
  head/usr.bin/man/manpath.1

Modified: head/usr.bin/man/man.sh
==============================================================================
--- head/usr.bin/man/man.sh	Sun Mar 12 07:09:50 2017	(r315141)
+++ head/usr.bin/man/man.sh	Sun Mar 12 10:56:19 2017	(r315142)
@@ -778,26 +778,19 @@ search_path() {
 
 	IFS=:
 	for path in $PATH; do
-		# Do a little special casing since the base manpages
-		# are in /usr/share/man instead of /usr/man or /man.
-		case "$path" in
-		/bin|/usr/bin)	add_to_manpath "/usr/share/man" ;;
-		*)	if add_to_manpath "$path/man"; then
-				:
-			elif add_to_manpath "$path/MAN"; then
-				:
-			else
-				case "$path" in
-				*/bin)	p="${path%/bin}/man"
-					add_to_manpath "$p"
-					p="${path%/bin}/share/man"
-					add_to_manpath "$p"
-					;;
-				*)	;;
-				esac
-			fi
-			;;
-		esac
+		if add_to_manpath "$path/man"; then
+			:
+		elif add_to_manpath "$path/MAN"; then
+			:
+		else
+			case "$path" in
+			*/bin)	p="${path%/bin}/share/man"
+				add_to_manpath "$p"
+				p="${path%/bin}/man"
+				add_to_manpath "$p"
+				;;
+			esac
+		fi
 	done
 	unset IFS
 
@@ -1007,7 +1000,7 @@ SYSCTL=/sbin/sysctl
 
 debug=0
 man_default_sections='1:8:2:3:n:4:5:6:7:9:l'
-man_default_path='/usr/share/man:/usr/share/openssl/man:/usr/local/man'
+man_default_path='/usr/share/man:/usr/share/openssl/man:/usr/local/share/man:/usr/local/man'
 cattool='/usr/bin/zcat -f'
 
 config_global='/etc/man.conf'

Modified: head/usr.bin/man/manpath.1
==============================================================================
--- head/usr.bin/man/manpath.1	Sun Mar 12 07:09:50 2017	(r315141)
+++ head/usr.bin/man/manpath.1	Sun Mar 12 10:56:19 2017	(r315142)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 1, 2010
+.Dd March 11, 2017
 .Dt MANPATH 1
 .Os
 .Sh NAME
@@ -66,15 +66,10 @@ for the first of:
 .Pa pathname/MAN
 .It
 If pathname ends with /bin:
+.Pa pathname/../share/man
+and
 .Pa pathname/../man
 .El
-Note: Special logic exists to make
-.Pa /bin
-and
-.Pa /usr/bin
-look in
-.Pa /usr/share/man
-for manual files.
 .It
 The configuration files listed in the
 .Sx FILES



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703121056.v2CAuJ3T001001>