From owner-freebsd-current Mon Jun 26 1:25:54 2000 Delivered-To: freebsd-current@freebsd.org Received: from blizzard.sabbo.net (blizzard.sabbo.net [193.193.218.18]) by hub.freebsd.org (Postfix) with ESMTP id A6DB937BB40; Mon, 26 Jun 2000 01:25:41 -0700 (PDT) (envelope-from sobomax@FreeBSD.org) Received: from vic.sabbo.net (vic.sabbo.net [193.193.218.106]) by blizzard.sabbo.net (8.9.1/8.9.3) with ESMTP id LAA05887; Mon, 26 Jun 2000 11:24:16 +0300 (EEST) Received: from FreeBSD.org (big_brother.vega.com [192.168.1.1]) by vic.sabbo.net (8.9.3/8.9.3) with ESMTP id LAA07608; Mon, 26 Jun 2000 11:25:26 +0300 (EEST) (envelope-from sobomax@FreeBSD.org) Message-ID: <3957136A.DCEC9CE@FreeBSD.org> Date: Mon, 26 Jun 2000 11:25:15 +0300 From: Maxim Sobolev Organization: Vega International Capital X-Mailer: Mozilla 4.73 [en] (WinNT; I) X-Accept-Language: uk,ru,en MIME-Version: 1.0 To: Jeremy Lea Cc: current@FreeBSD.org Subject: Re: Call for review: pkg_which. References: <20000626005659.B311@shale.csir.co.za> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Jeremy Lea wrote: > Hi guys, > > This is BCC'd to ports, since it is mostly for use there... > > I've placed the source for a new command, pkg_which, on > http://people.freebsd.org/~reg/. > > The idea behind this command is to get Ports/Packages to register their > dependencies based on what is on the system, not what they think should > be there. Thus, if you have old libraries or a different version of > shostscript installed, this will allow the system to register the > correct dependency. Patches to bsd.port.mk and pkg_add to follow > shortly. > > At the moment I'd like some people to test and review this. It works > for me, but history has shown that to be a poor indicator of real > success. Also, I'm not used to style(9), so this might be a mess, and > the man page certainly needs some work. Some time ago I had similar idea, but thought about slightly different approach - use existing pkg_info facilities instead of adding new command. Idea is simple: add new option to the pkg_info, for example "-f" which takes name of the file and names of several installed packages. Then pkg_info examines PLISTs of those packages and returns 0 if the file belongs to those packages or 1 if it is not (e.g. pkg_info -f /usr/local/bin/somefile package1-1.0 package2-1.0). This could be easily implemented without much bloat (I think 30-40 lines of additional code will be sufficient). -Maxim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message