> -----Original Message-----
> From: Marc Espie [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 24, 2005 6:43 PM
> To: Will H. Backman
> Cc: misc@openbsd.org
> Subject: Re: package installation script hints
> 
> On Wed, Aug 24, 2005 at 04:35:13PM -0400, Will H. Backman wrote:
> > 1. Packages get installed in a sub-optimal order.  Quite often one
> > package on the list will have already been installed as a
dependency.  I
> > think my script downloads the redundant package before deciding that
it
> > was already installed.  Good ways to stop that?
> 
> Put the full list in the single pkg_add you want to run, this will get
> sorted appropriately.
> 
> PKG_PATH=ftplocation pkg_add `cat pkglist`
> is about what you want.

Nice to see that pkg_add doesn't actually need the .tgz when PKG_PATH is
specified.  That reduces the need for a lot of my code.  Just "ls
/var/db/pkg > pkglist" and move that list to a new host and run pkg_add
`cat pkglist`, with PKG_PATH properly set of course.

Two more interesting things (assuming you found any of this
interesting).

1 - If the new host happens to have one of those packages installed,
perhaps because I stopped the installation of packages the first time,
then pkg_add will stop when it hits an already installed package.  I can
fix that with pkg_delete `ls /var/db/pkg` and start over, but perhaps
there is a better way?

2 - How is pkg_add -u working for people?

Reply via email to