On 16-06-29 03:16:02, Theo Buehler wrote: > On Tue, Jun 28, 2016 at 08:09:02PM -0500, Edgar Pettijohn wrote: > > This doesn't seem possible, but maybe I'm missing something. > > > > I would like pkg_info to tell me where to find a package in > > the ports tree. For example: > > > > If I go to /usr/ports and do make search key=wget I can find > > the following. > > > > Port: wget-1.16.3p0 > > Path: net/wget > > Info: retrieve files from the web via HTTP, HTTPS and FTP > > Maint: The OpenBSD ports mailing-list <po...@openbsd.org> > > Index: net lang/python > > L-deps: STEM->=0.10.38:devel/gettext converters/libiconv devel/libidn > > devel/pcre net/libpsl > > B-deps: STEM->=0.10.38:devel/gettext archivers/xz devel/gettext-tools > > R-deps: STEM->=0.10.38:devel/gettext > > Archs: any > > > > Which tells me to go to /usr/ports/net/wget. Is there currently > > a way to achieve this with any of the pkg_ tools? > > Use the -P option: > > $ pkg_info -P wget > Information for inst:wget-1.18 > > Pkgpath: > net/wget > I can't believe I missed that. Beats the hell out of my alternative.
pkg_info -f wget | grep pkgpath | awk '{print $2}' | cut -f 2 -d = -- Edgar Pettijohn