vinny-mail-01+f.questions at palaceofretention.ca
Thu Jul 19 02:27:22 UTC 2007
Nejc ©koberne wrote:
> I would like to create a custom set of packages, so that they will
> be installable to my other FreeBSD boxen.
> As I understand, I have to use 'make package-recursive', but I have
> some problems with it:
> 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.
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)
=================== 8< ======================
# 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 = "/usr/sbin/pkg_create"
dash_b = '-b'
for name in sys.argv[1:]:
# print ":: ", name
pkg_name = 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 = os.spawnv(os.P_WAIT, pkg_create, [pkg_create, dash_b,
print "Status:", status
====================== 8< ===================
More information about the freebsd-questions