From owner-freebsd-ports@FreeBSD.ORG Sun Jun 17 06:48:45 2007 Return-Path: X-Original-To: ports@FreeBSD.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BFECC16A400 for ; Sun, 17 Jun 2007 06:48:45 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from ch-smtp02.sth.basefarm.net (ch-smtp02.sth.basefarm.net [80.76.149.213]) by mx1.freebsd.org (Postfix) with ESMTP id 4E0FD13C44B for ; Sun, 17 Jun 2007 06:48:45 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from c83-253-10-135.bredband.comhem.se ([83.253.10.135]:64793 helo=falcon.midgard.homeip.net) by ch-smtp02.sth.basefarm.net with smtp (Exim 4.66) (envelope-from ) id 1HzoKS-0001LO-96 for ports@FreeBSD.org; Sun, 17 Jun 2007 08:33:41 +0200 Received: (qmail 46232 invoked from network); 17 Jun 2007 08:33:38 +0200 Received: from owl.midgard.homeip.net (10.1.5.7) by falcon.midgard.homeip.net with SMTP; 17 Jun 2007 08:33:38 +0200 Received: (qmail 68724 invoked by uid 1001); 17 Jun 2007 08:33:38 +0200 Date: Sun, 17 Jun 2007 08:33:38 +0200 From: Erik Trulsson To: "M. Warner Losh" Message-ID: <20070617063338.GB68637@owl.midgard.homeip.net> Mail-Followup-To: "M. Warner Losh" , LoN_Kamikaze@gmx.de, ports@FreeBSD.org References: <20070616.213319.-1889956458.imp@bsdimp.com> <4674C9F6.60508@gmx.de> <4674CE41.7000103@gmx.de> <20070617.001516.-1615142562.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070617.001516.-1615142562.imp@bsdimp.com> User-Agent: Mutt/1.5.14 (2007-02-12) X-Originating-IP: 83.253.10.135 X-ACL-Warn: Too high rate of unknown addresses received from you X-Scan-Result: No virus found in message 1HzoKS-0001LO-96. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1HzoKS-0001LO-96 c05b8e64947ab7c063b05a289c54da9c Cc: ports@FreeBSD.org, LoN_Kamikaze@gmx.de Subject: Re: How to get a list of all kernel modules X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jun 2007 06:48:45 -0000 On Sun, Jun 17, 2007 at 12:15:16AM -0600, M. Warner Losh wrote: > In message: <4674CE41.7000103@gmx.de> > "[LoN]Kamikaze" writes: > : [LoN]Kamikaze wrote: > : > M. Warner Losh wrote: > : >> Greetings, > : >> > : >> is there an easy way to get a list of all the ports that compile > : >> kernel modules? I'd like to add them to my kernel build. I did this > : >> once before, but I lost all information on how to do it when I lost my > : >> laptop's hard disk after the last bsdcan... > : >> > : >> Warner > : > > : > # find /boot/ -type f -exec pkg_info -W \{} \; > : > : Sorry about that, it takes very long. Better is: > : > : # sh -c 'for mod in `pkg_info -qaL|grep -E "^/+boot"`; { pkg_info -W "$mod"; } > > This sounds great, except for one problem. This will tell me all the > modules that I've installed that are from ports. Since I've never > installed any from ports, this will not work for what I want. I want > a list of all the ports in /usr/ports that install kernel modules. > I'd even settle for a list of all the ports in /usr/ports that only > install modules. > > Something like > egrep -l '\.ko$' /usr/ports/*/*/pkg-plist | sed -e s=/pkg-plist// > might do the trick, but that blows the command line limits out of the > water. Replacing egrep with 'find' would need to be carefully > constructed to avoid false positives in any work directories I have > laying around. I was hoping for something a little easier to do... Keep in mind that not all ports have a 'pkg-plist' file. Some ports list that info directly in the Makefile. I don't think there is any way of doing what you want without searching through every single Makefile/pkg-plist file in the entire ports tree. -- Erik Trulsson ertr1013@student.uu.se