Date: Fri, 23 Mar 2001 17:33:01 -0500 From: Garrett Rooney <rooneg@electricjellyfish.net> To: Jordan Hubbard <jkh@osd.bsdi.com> 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> In-Reply-To: <20010323142555L.jkh@osd.bsdi.com>; from jkh@osd.bsdi.com on Fri, Mar 23, 2001 at 02:25:55PM -0800 References: <200103231845.f2NIjPe07661@freefall.freebsd.org> <20010323142555L.jkh@osd.bsdi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010323173301.A52371>