From owner-freebsd-current@FreeBSD.ORG Sat Sep 11 14:01:51 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F04EB106566C for ; Sat, 11 Sep 2010 14:01:50 +0000 (UTC) (envelope-from swell.k@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 9B93D8FC29 for ; Sat, 11 Sep 2010 14:01:50 +0000 (UTC) Received: by qwg5 with SMTP id 5so2538826qwg.13 for ; Sat, 11 Sep 2010 07:01:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject :in-reply-to:references:user-agent:date:message-id:mime-version :content-type; bh=yUVCEKzp3lOmQujtt676eI0Sj6TK86PdAxgqHVkwBnY=; b=tpeAKQJHVeD5N0jIF6R4vNNMc7Hsu59va5PHgjdN385gQTgxU4QwG2HkpUhWbtJnTE tYLFSsdvqa/iYY+dcXOwogVSoeRShnJgmNsH8dTX7F1qzntZ4WvVDMkcf6QKj/TYQxD3 22nb+cKXGNOxHu9XVkWNKsjKCq3bWCJm7EboA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type; b=NoAn2Sy+QAN/BcBxMievcCy8ZRQ0cYKd3UNxlNuxQTk3G0WvWtzK+VRBoe28GHYpAT Ol+kRKVK2StgqX19o/BCkgyFDyRF7zrd0CvoXaL7LZdz9b3NgyduM3MqXcuqn8X3L2E7 y+y6RfoOz83LRnOU8RBZF1VkFRXQku9omn5Q0= Received: by 10.229.182.141 with SMTP id cc13mr1739668qcb.56.1284213709720; Sat, 11 Sep 2010 07:01:49 -0700 (PDT) Received: from localhost (pool-108-11-203-231.hrbgpa.fios.verizon.net [108.11.203.231]) by mx.google.com with ESMTPS id t1sm4000664qcs.21.2010.09.11.07.01.46 (version=SSLv3 cipher=RC4-MD5); Sat, 11 Sep 2010 07:01:48 -0700 (PDT) From: Anonymous To: Gordon Tetlow In-Reply-To: <766041FD-DAE2-484A-AA8F-60DA99A86B9C@lassitu.de> (Stefan Bethke's message of "Sat, 11 Sep 2010 09:41:25 +0200") References: <86d3smb83g.fsf@gmail.com> <766041FD-DAE2-484A-AA8F-60DA99A86B9C@lassitu.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) Date: Sat, 11 Sep 2010 17:57:13 +0400 Message-ID: <86r5h0peme.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Cc: freebsd-current@freebsd.org, Stefan Bethke Subject: Re: CFR: Replace man/manpath/whatis/apropos with a shell script X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Sep 2010 14:01:51 -0000 Stefan Bethke writes: > Am 11.09.2010 um 09:35 schrieb Gordon Tetlow: > >> On Thu, Sep 9, 2010 at 8:17 PM, Anonymous wrote: >> >>> Gordon Tetlow writes: >>> >>>> 2. Imports configuration from /usr/local/etc/man.d/*.conf and >>> /etc/man.conf >>>> (purposefully changed the manpath.config file since it is a different >>>> syntax). >>> >>> Hmm, and if LOCALBASE != /usr/local? hier(7) does not specify /usr/local >>> as the only place installed packages may reside in, only default one. >>> >> >> That variable is not easily found in shell. I'm open to suggestions on how >> to figure it out. I suppose I could try something like make -V LOCALBASE Nah, don't bring make(1) dependency. The user may have WITHOUT_MAKE in his src.conf. So, just use LOCALBASE from environment if it's defined. >> since it would be in /etc/make.conf if it is set. Another alternative would >> be to parse the PATH and look for ../etc/man.d for each path component. That How about let user control search_path behaviour? PATH_MAN_SUB bin/../man PATH_MAN_SUB bin/../.man # e.g. for ~/.bin + ~/.man PATH_MAN_SUB /usr/bin/../share/man PATH_CONF_SUB bin/../etc/man.d It's a bit more flexible than MANPATH_MAP ever was. BTW, if you care about aesthetics ../../../../ can be eleminated with realpath(1). >> would be even more generic (and allow for the user to customize it >> potentially). > > Take it from /etc/man.conf, like the rc.d paths are resolved? This'll work, too. I already have to set a bunch of variables in rc.conf because rc.d avoids LOCALBASE as some kind of curse. While environ(7) exist just for that, make using non-default configuration more easy.