python script to backup installed packages

Adam Vande More amvandemore at
Fri Feb 12 02:35:22 UTC 2010

On Thu, Feb 11, 2010 at 1:31 PM, Giorgos Keramidas <keramida at
> wrote:

> My own version groks an os.environ['EXTRA_PKG_CREATE_ARGS'] option too
> and inserts the extra options before the ["-b", "package"] arguments of
> pkg_create, so that I can run the script for example with:
>    env EXTRA_PKG_CREATE_ARGS='-Rvn' ./
> This way package dependencies are saved too (-R option), the output of
> the `pkg_create -b' command is slightly more verbose, and saving the
> same package multiple times doesn't overwrite existing packages of the
> same version (-n option).
Thanks for the tips, I may add some of your functionality to my own.  I
think I might add a couple more features like accepting a backup path from
the command line and an auto create for the dir if it doesn't exist.  One
other thing that might be useful is for it to automatically create an
install script for the backed up packages which takes into account
dependencies.  Almost have a package management system like some other
unnamed OS's then. ;)

Adam Vande More

More information about the freebsd-questions mailing list