Date: Wed, 18 Jul 2007 21:56:53 -0400 From: Vinny <vinny-mail-01+f.questions@palaceofretention.ca> To: User Questions <freebsd-questions@freebsd.org> Subject: Re: make package-recursive Message-ID: <469EC4E5.1010500@palaceofretention.ca> In-Reply-To: <4693543C.1010005@skoberne.net> References: <4693543C.1010005@skoberne.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?469EC4E5.1010500>