Utility for safe updating of ports in base system
Sean C. Farley
scf at FreeBSD.org
Thu Mar 20 08:21:59 PDT 2008
On Thu, 20 Mar 2008, Michel Talon wrote:
> On Thu, Mar 20, 2008 at 05:59:28PM +0800, Denise H. G. wrote:
>> Michel Talon <talon at lpthe.jussieu.fr> writes:
>> Actually I don't think a batch download and install process would
>> help much, especially for a freshly installed system because it might
>> be a huge download job and much waiting time if one is going to
>> install GNOME/KDE etc. from scratch. Perhaps the new `pkg_upgrade'
>> could provide versatile options to complete such tasks.
> In fact a batch download, followed by batch install is much faster
> than constant interspersing of backup, download, install, etc. like
> portupgrade does. In particular there is only one ftp connection for
> downloading everything which cuts on time, and you can do backups at
> the same time. If you don't beleive me you can try the prototype (in
> python) that i have written a year ago, and which does precisely that:
> (which needs http://www.lpthe.jussieu.fr/~talon/pkg_save.py)
> Most of the time in the script is spent recomputing the INDEX for all
> installed files, because i assumed the INDEX is not necessarily up to
Except for the package portion, I also wrote a script to update ports
when Perl was still in the base. The features I really like about it:
1. No dependency on INDEX. This does make it more expensive to start,
but the program does cache as much as possible as it runs. No need
to perform a duplicate make all-depends-list in a directory if it has
already been performed.
2. Precalculation of updates before starting. This allows a lot of
operations to be performed upfront: ignore checking, conflict
checking, prefetching and ports no longer needed by child ports.
3. Crash recovery. It saves what it has completed along with the build
tree to a database, so recovery/restarts are quick.
4. Uses portconf for settings and its own rc file to determine what not
to build. BTW, I think the +IGNOREME files for portmaster should be
in /var/db/ports, so they may traverse a manual pkg_delete && make
1. I have not put much time into it lately.
2. Perl is not part of base.
3. Does not respect options set in /var/db/ports. It solely relies on
4. The tree building code is really convoluted and needs replacement.
scf at FreeBSD.org
More information about the freebsd-ports