From owner-cvs-all Fri Mar 23 14:33: 7 2001 Delivered-To: cvs-all@freebsd.org Received: from isris.pair.com (isris.pair.com [209.68.2.39]) by hub.freebsd.org (Postfix) with SMTP id EB14A37B71A for ; Fri, 23 Mar 2001 14:33:02 -0800 (PST) (envelope-from rooneg@isris.pair.com) Received: (qmail 57463 invoked by uid 3130); 23 Mar 2001 22:33:01 -0000 Date: Fri, 23 Mar 2001 17:33:01 -0500 From: Garrett Rooney To: Jordan Hubbard Cc: sobomax@FreeBSD.org, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/pkg_install/info info.h main.c perform.c pkg_info.1 show.c src/usr.sbin/pkg_install/lib deps.c exec.c lib.h match.c msg.c pen.c str.c Message-ID: <20010323173301.A52371@electricjellyfish.net> References: <200103231845.f2NIjPe07661@freefall.freebsd.org> <20010323142555L.jkh@osd.bsdi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010323142555L.jkh@osd.bsdi.com>; from jkh@osd.bsdi.com on Fri, Mar 23, 2001 at 02:25:55PM -0800 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, Mar 23, 2001 at 02:25:55PM -0800, Jordan Hubbard wrote: > What did you end up doing about the realpath() issue? Just > curious. the patch as committed doesn't use realpath at all. it isn't quite as smart about relative paths as a result, but it will deal with simple cases. (ie, if you're in /usr/X11R6 you can run 'pkg_info -W bin/sawfish' and it'll work, but if you give it something more compilcated, with ..'s or .'s or multiple slashes it'll fail.) it also allows you to just specify an executable, and if it can't find it in the current dir (which would indicate you were trying a relative path), it'll use which(1) to get a path to search for. so it's fairly smart, without using realpath. ideally, i was thinking of writing some code to deal with the more complicated cases, but real life got in the way. how often will someone want to say 'pkg_info -W ../.././/foo' anyway? -- garrett rooney Unix was not designed to stop you from rooneg@electricjellyfish.net doing stupid things, because that would http://electricjellyfish.net/ stop you from doing clever things. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message