Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Dec 2005 14:13:13 +0000
From:      Mark Ovens <marko@freebsd.org>
To:        freebsd-questions@freebsd.org
Cc:        eoghan <freebsd@redry.net>, Kent Stewart <kstewart@owt.com>
Subject:   Re: pkgdb format
Message-ID:  <43B3EEF9.3010004@freebsd.org>
In-Reply-To: <200512071741.03088.kstewart@owt.com>
References:  <F7AA4FC0-B189-408E-9FAC-180917D2CCF8@redry.net> <200512071741.03088.kstewart@owt.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Kent Stewart wrote:
> On Wednesday 07 December 2005 12:55 pm, eoghan wrote:
>> Hello
>> Ive recently upgraded to 6.0 and I decided to upgrade my ports... So
>> I ran a:
>> portupgrade -af
>> Its running fine, but each time its upgrade a port I get:
>> [Updating the pkgdb <format:bdb1_btree> in /var/db/pkg ... Failed
>> `Inappropriate file type or format'; rebuild needed] [Rebuilding the
>> pkgdb <format:bdb1_btree> in /var/db/pkg ... - 439 packages found (-0
>> +439)
>>
>> Just wondering if its to do with my upgrade to 6.0 (from 5.4)
>> Thanks
> 
> 
> Not from my experience. You are setting the package database interface 
> one way in one spot and using the default someplace else. Since they 
> are incompatible, it has to rebuild the port data base. Look for the 
> string bdb in your scripts and in pkgtools.conf.
> 

I've got the same problem running `portupgrade -af' after upgrading from 
5.4 -> 6

After reading this thread, I killed the upgrade, deleted INDEX-6, 
INDEX-6.db, and pkgdb.db; rebuilt pkgdb.db using `pkgdb -u' and re-ran 
`portupgrade -af'

It started off OK (using dbm_hash) but after a couple of hours it had 
started continually rebuilding pkgdb.db. The sequence is:

Build new version of port
Rebuild pkgdb.db in bdb1_btree format
Backup old version of port
Rebuild pkgdb.db in dbm_hash format
Uninstall old version of port
Rebuild pkgdb.db in bdb1_btree format
Deinstall
Clean
Rebuild pkgdb.db in dmb_hash format

It is rebuilding pkgdb.db *4 times per port* which will add several 
hours to the build time.

The fact that Kent hasn't had this problem and that the upgrade started 
off correctly for me suggests that it goes wrong when a particular port 
gets installed.

OP: Did you find a solution to this?

Kent: I don't have the string bdb in pkgtools.conf, nor anywhere else I 
can think to look, except INDEX-6.db - but that was built when 
portupgrade started and things worked OK at first.

Anyone else got any ideas?

Regards and a Happy New Year

Mark




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43B3EEF9.3010004>