From owner-freebsd-questions Thu Mar 23 15:11:55 2000 Delivered-To: freebsd-questions@freebsd.org Received: from globnix.org (athenaeum.psidev.net [194.159.247.11]) by hub.freebsd.org (Postfix) with ESMTP id 55CB037B50E for ; Thu, 23 Mar 2000 15:11:50 -0800 (PST) (envelope-from phil@globnix.org) Received: (from phil@localhost) by globnix.org (8.9.3/8.9.3) id XAA01456; Thu, 23 Mar 2000 23:11:48 GMT Date: Fri, 24 Mar 2000 00:11:48 +0100 From: Phil Pennock To: Ben Smithurst Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Submitting a program Message-ID: <20000324001148.A10152@athenaeum.globnix.org> References: <20000323204628.A10998@athenaeum.globnix.org> <20000323220042.A87103@strontium.scientia.demon.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <20000323220042.A87103@strontium.scientia.demon.co.uk>; from ben@scientia.demon.co.uk on Thu, Mar 23, 2000 at 10:00:42PM +0000 Organisation: Organisation? Here? No, over there ----> X-NIC-Handles: COCO-149560 (ignore PP8185) X-Disclaimer: Any views expressed in this message, where not explicitly attributed otherwise, are mine and mine alone. Such views do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. X-Phase-of-Moon: The Moon is Waning Gibbous (85% of Full) Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Typing away merrily, Ben Smithurst produced the immortal words: > send-pr Okay, noted. Though treating a new feature as a problem irks me. "The problem is the lack of a convenient way to do this". > However, it might be better for you to add this functionality to > pkg_info, rather than adding a separate program, and send-pr the diff. The difference being that pkg_info is written in C, and I don't fancy regression-testing changes to that, etc. It's more bloaty. Scripts are nice - scripts are your friend. Leverage existing tools. Mind, there are two issues with the script as stands, one of which applies to ANY attempt to solve this problem: * I didn't explicitly set PATH to include /usr/bin - how much of a problem this is depends on how much of a pedant you are. :^) * It's been pointed out to me by Marc Espie that files can be produced without being explicitly listed in +CONTENTS - eg, via @exec So, pkg_which can report likely candidates for file origin, provided it's explitly listed in +CONTENTS. For all my test cases, this has proven to be the case. So this solution is better than nothing, but perhaps not good enough to be enshrined into pkg_info as is. In fact, it seems there is no "full solution" to this. pkg_which works for my purposes and I supplied it in the hope that it might be useful. Beyond that, I'm not really bothered what happens (as long as I don't get sued for providing something which isn't perfect ...) -- --> Phil Pennock, DeathWatch Admin. "We've got a patent on the conquering of a country through the use of force. We believe in world peace through extortionate license fees." -Bluemeat To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message