From owner-freebsd-ports@freebsd.org Fri Mar 10 17:32:42 2017 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9780BD068AE for ; Fri, 10 Mar 2017 17:32:42 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 7BF6B1147 for ; Fri, 10 Mar 2017 17:32:42 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 78810D068AB; Fri, 10 Mar 2017 17:32:42 +0000 (UTC) Delivered-To: ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 764DAD068A9; Fri, 10 Mar 2017 17:32:42 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay110.isp.belgacom.be (mailrelay110.isp.belgacom.be [195.238.20.137]) (using TLSv1.2 with cipher RC4-SHA (128/128 bits)) (Client CN "relay.skynet.be", Issuer "GlobalSign Organization Validation CA - SHA256 - G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 971AB1145; Fri, 10 Mar 2017 17:32:40 +0000 (UTC) (envelope-from tijl@freebsd.org) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2C2FgDu4sJY/0nD8VFdDg4BAQQBAQoBA?= =?us-ascii?q?YNRQRCBGoNgiwGQXSkBlQ6CDoYiAoJAQhYBAgEBAQEBAQFrKIUWAQUjMyMQCw4?= =?us-ascii?q?KAgIFIQICDyoeBhOKBLF6giaKaAEBAQEGAQEBASSBC4oyhFSDBoJfBY9YjGSSK?= =?us-ascii?q?3aQO5NAJgkoWCs4LAiGVz4/NQGKGQEBAQ?= X-IPAS-Result: =?us-ascii?q?A2C2FgDu4sJY/0nD8VFdDg4BAQQBAQoBAYNRQRCBGoNgiwG?= =?us-ascii?q?QXSkBlQ6CDoYiAoJAQhYBAgEBAQEBAQFrKIUWAQUjMyMQCw4KAgIFIQICDyoeB?= =?us-ascii?q?hOKBLF6giaKaAEBAQEGAQEBASSBC4oyhFSDBoJfBY9YjGSSK3aQO5NAJgkoWCs?= =?us-ascii?q?4LAiGVz4/NQGKGQEBAQ?= Received: from 73.195-241-81.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([81.241.195.73]) by relay.skynet.be with ESMTP; 10 Mar 2017 18:32:31 +0100 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.15.2/8.15.2) with ESMTP id v2AHWTe2099955; Fri, 10 Mar 2017 18:32:30 +0100 (CET) (envelope-from tijl@FreeBSD.org) Date: Fri, 10 Mar 2017 18:32:29 +0100 From: Tijl Coosemans To: Steve Kargl Cc: Dag-Erling =?UTF-8?B?U23DuHJncmF2?= , ports@freebsd.org, arch@freebsd.org, Baptiste Daroussin , John Baldwin , freebsd-arch@freebsd.org Subject: Re: manpath change for ports ? Message-ID: <20170310183229.72ec31e4@kalimero.tijl.coosemans.org> In-Reply-To: <20170310163830.GA46344@troutmask.apl.washington.edu> References: <20170306235610.cmpxk27jhoafel6l@ivaldir.net> <86mvcvojzt.fsf@desk.des.no> <2721378.xr7MGKcqvA@ralph.baldwin.cx> <86a88tmpe8.fsf@desk.des.no> <20170310170308.65d903d8@kalimero.tijl.coosemans.org> <20170310163830.GA46344@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Mar 2017 17:32:42 -0000 On Fri, 10 Mar 2017 08:38:30 -0800 Steve Kargl wrote: > On Fri, Mar 10, 2017 at 05:03:08PM +0100, Tijl Coosemans wrote: >> On Fri, 10 Mar 2017 10:50:39 +0100 Dag-Erling Sm=C3=B8rgrav = wrote: =20 >>> John Baldwin writes: =20 >>>> I wouldn't even mind if we had both /usr/local/man and /usr/local/shar= e/man >>>> so long as our default MANPATH included both if that means applying fe= wer >>>> patches to ports. =20 >>>=20 >>> The default MANPATH is constructed dynamically from PATH: >>>=20 >>> 1. From each component of the user's PATH for the first of: >>> - pathname/man >>> - pathname/MAN >>> - If pathname ends with /bin: pathname/../man >>> Note: Special logic exists to make /bin and /usr/bin look in >>> /usr/share/man for manual files. >>>=20 >>> If we change this to: >>>=20 >>> 1. From each component of the user's PATH for the first of: >>> - pathname/man >>> - pathname/MAN >>> - If pathname ends with /bin or /sbin: pathname/../man and >>> pathname/../share/man >>>=20 >>> we wouldn't need any "special logic", but I really don't like the idea >>> of having different ports installing man pages in different locations. = =20 >>=20 >> I grepped the ports tree and found nearly 5700 ports. That's a lot to >> change all at once but it may be doable. It depends on how much fallout >> there is in the exp-run. =20 >=20 > ln -s /usr/local/share/man /usr/local/man >=20 > should cause the manpages to land where you want. Then port > maintainers can sweep ports/ to allow for the removal of symlink.=20 Yeah, I had to deal with installing through symlinks in the Linux ports because bin, lib and sbin have become symlinks there now. There are complications with that. FreeBSD releases have a bug in libarchive that causes problems when extracting hardlinks through symlinks. Recent versions of pkg have workarounds for that but not everybody runs it yet. Before you can create the symlink you have to move the existing directory, but what if the new directory already exists? Will you overwrite files? Commands like pkg-which and pkg-delete only work through the symlink because the new paths are not in the pkg database. Packages that don't know about the symlink may try to create it as a directory or remove it as a directory on uninstall. I ended up avoiding it at all costs in the Linux ports by moving files around in the staging area if necessary.