From owner-freebsd-ports@FreeBSD.ORG Sun Jun 17 06:14:59 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 62B6B16A41F for ; Sun, 17 Jun 2007 06:14:59 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 2333713C455 for ; Sun, 17 Jun 2007 06:14:59 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.8/8.13.4) with ESMTP id l5H6Ek83033921; Sun, 17 Jun 2007 00:14:46 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 17 Jun 2007 00:15:16 -0600 (MDT) Message-Id: <20070617.001516.-1615142562.imp@bsdimp.com> To: LoN_Kamikaze@gmx.de From: "M. Warner Losh" In-Reply-To: <4674CE41.7000103@gmx.de> References: <20070616.213319.-1889956458.imp@bsdimp.com> <4674C9F6.60508@gmx.de> <4674CE41.7000103@gmx.de> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sun, 17 Jun 2007 00:14:46 -0600 (MDT) Cc: ports@FreeBSD.org 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:14:59 -0000 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... Warner