From owner-freebsd-questions@FreeBSD.ORG Thu Jul 19 02:27:22 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9E8B616A406 for ; Thu, 19 Jul 2007 02:27:22 +0000 (UTC) (envelope-from vinny-mail-01+f.questions@palaceofretention.ca) Received: from www.giovannetti.ca (www.giovannetti.ca [206.248.136.48]) by mx1.freebsd.org (Postfix) with ESMTP id 7367113C4B6 for ; Thu, 19 Jul 2007 02:27:22 +0000 (UTC) (envelope-from vinny-mail-01+f.questions@palaceofretention.ca) Received: from the.palaceofretention.ca (intgateway.palaceofretention.ca [10.10.10.42]) by www.giovannetti.ca (Postfix) with ESMTP id 015F011460 for ; Wed, 18 Jul 2007 22:04:07 -0400 (EDT) Message-ID: <469EC4E5.1010500@palaceofretention.ca> Date: Wed, 18 Jul 2007 21:56:53 -0400 From: Vinny User-Agent: Thunderbird 2.0.0.0 (X11/20070528) MIME-Version: 1.0 To: User Questions References: <4693543C.1010005@skoberne.net> In-Reply-To: <4693543C.1010005@skoberne.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: make package-recursive X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2007 02:27:22 -0000 Nejc =A9koberne wrote: > Hello, >=20 > I would like to create a custom set of packages, so that they will > be installable to my other FreeBSD boxen. >=20 > As I understand, I have to use 'make package-recursive', but I have > some problems with it: >=20 > 1. Is there a way to tell 'make package-recursive' not to _install_ > package, but only build it? It is annonying and time-consuming > to deinstall every package after it is installed. [snip] Not quite what you want but this little python script will build packages of all currently installed ports. (Watch out for any wrapping of code) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 8< =3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D #!/usr/bin/env python # make_packages.py # # Script to create packages for currently installed ports/packages. # Will build packages in the current working directory so a # 'cd /usr/ports/packages/All' command would be useful before running it.= # # Usage: script make_packages.log && make_packages.py /var/db/pkg/* # # needed modules import sys, os pkg_create =3D "/usr/sbin/pkg_create" print '=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D' dash_b =3D '-b' for name in sys.argv[1:]: # print ":: ", name pkg_name =3D name.split('/')[-1] print "Installed package:", pkg_name # run pkg_create command, capture errors but don't stop print "Command: ", pkg_create, dash_b, pkg_name status =3D os.spawnv(os.P_WAIT, pkg_create, [pkg_create, dash_b,=20 pkg_name]) print "Status:", status =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 8< =3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Enjoy.