From owner-freebsd-questions@FreeBSD.ORG Fri Feb 12 02:35:22 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B25E106566B for ; Fri, 12 Feb 2010 02:35:22 +0000 (UTC) (envelope-from amvandemore@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 403458FC12 for ; Fri, 12 Feb 2010 02:35:22 +0000 (UTC) Received: by pwj7 with SMTP id 7so128853pwj.13 for ; Thu, 11 Feb 2010 18:35:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=4+sIvVDPe3WgDMH38yfyscxbYDC+tfoDwUzJlujhnps=; b=tx7IohqRTCEwHt0PBkfcQZViKcKXL5UCq/lSZ/gbrjF+BIkTwtZqd2jKcEG1EwNqVV nyUOc9OIgDVxTADvTcmEK+Yn17hoZs/rTf/3DKXJcT5wm0QPz7acSiW+ae0MyQ5txGCy 8zipC2qow8stFTYm6K/dcSgBOGY/6EqJfMBkY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=kq7WUPENIEEN7LmOPnkYHfmciKdti7MdopJN0owpqlCeg+SNNn3yciUNFZw7kvrcou CVh9GAuqVoof9D2fJXlWu2mlUtKxUKCW2fmp20jseRivrrdaIWrZP0pfQgvdwvXufEIQ s8RbnOcfSl8wRInIbEfBeXZClCS3RL1XdJ3O8= MIME-Version: 1.0 Received: by 10.142.249.19 with SMTP id w19mr492897wfh.194.1265942116809; Thu, 11 Feb 2010 18:35:16 -0800 (PST) In-Reply-To: <87d40btvqp.fsf@kobe.laptop> References: <6201873e1002110815l312da12fr5388956f32465516@mail.gmail.com> <87d40btvqp.fsf@kobe.laptop> Date: Thu, 11 Feb 2010 20:35:16 -0600 Message-ID: <6201873e1002111835p7836d8e0xd35c7765c6069f1@mail.gmail.com> From: Adam Vande More To: Giorgos Keramidas Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-questions@freebsd.org Subject: Re: python script to backup installed packages 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: Fri, 12 Feb 2010 02:35:22 -0000 On Thu, Feb 11, 2010 at 1:31 PM, Giorgos Keramidas 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' ./savepkg.py > > 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