portupgrade running slower than before?

Matthew Seaman m.seaman at infracaninophile.co.uk
Thu Sep 16 04:13:40 PDT 2004


On Wed, Sep 15, 2004 at 02:56:41PM -0400, John Cholewa wrote:
> I started "portupgrade -ra" on my home mail server (FreeBSD 
> 5.2.1-RELEASE) two or three hours ago.  It says "[Updating the pkgdb 
> <format:bdb1_btree> in /var/db/pkg ... - 246 packages found (-0 +1) . 
> done]", and the output hasn't changed since.  For much of this time, 
> ruby18 has been using 90% of my system's resources.  It's obviously 
> doing *something*, but I can't see any ironclad progress in terms of 
> packages being updated.

Actually, this could be another symptom of the bdb1_btree bug that has
been affecting portsdb for so many people recently.

First, try killing that portupgrade process and restarting it.  If it
runs to completion successfully then you're happy.  If it hangs again,
or crashes then you'll need to take some ameliorative action.

The first thing to try is deleting the pkgdb.db file and rebuilding it
from scratch.  That file basically contains a quick-reference summary
of the contents of /var/db/pkg, so you won't lose any information by
deleting the file.  However it can occasionally become corrupted, in
which case it may show the symptoms you've been seeing:

    # rm /var/db/pkg/pkgdb.db
    # pkgdb -Fvu

If that still doesn't work, then I think that setting:

    # setenv PKG_BDBDRIVER bdb1_hash

in your environment should help.  After you do that, again run:

    # pkgdb -Fvu

and it should rebuild the whole /var/db/pkg/pkgdb.db file into the
bdb1_hash format.  And, I hope, work rather better than you've seen so
far.

Alternatively to that last step, you could install the
databases/ruby-bdb port together with whichever one of the
databases/db{2,3,4,41,41-nocrypto,42,42-nocrypto} ports takes your
fancy.  Check the ruby-bdb port Makefile for all the WITH_BDBn options
available.

Then you can put the following into /usr/local/etc/pkgtools.conf:

    ENV['PORTS_DBDRIVER'] = 'bdb_btree'
    ENV['PKG_DBDRIVER']   = 'bdb_btree'

or set them in your environment each time you use portupgrade(1),
portsdb(1), pkgdb(1) or other members of that family of tools.

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20040916/b4a72a41/attachment.bin


More information about the freebsd-questions mailing list