Date: Thu, 29 Nov 2007 19:20:49 -0800 From: Garrett Cooper <youshi10@u.washington.edu> To: Yuri <yuri@rawbw.com> Cc: freebsd-hackers@freebsd.org Subject: Re: pkgdb failures Message-ID: <474F8191.5080807@u.washington.edu> In-Reply-To: <1196388666.474f713a7d756@webmail.rawbw.com> References: <1196388002.474f6ea2bcf32@webmail.rawbw.com> <1196388666.474f713a7d756@webmail.rawbw.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Yuri wrote: > I deleted this file: /var/db/pkg/pkgdb.db and then pkgdb -fu succeeded. > But next time I ran I got the same error with /usr/ports/INDEX-7.db. > Then this error disappear. > > So it's most likely the bug with Berkeley DB. > Anybody else has these kind of problems? > > Yuri > > > Quoting Yuri <yuri@rawbw.com>: > > >> While doing portupgrade I am sporadically getting the error like below. >> After I ran 'pkgdb -fu' few times and this cured tye problem. But then >> after >> a while of portupgrade run I now get the error: >> >> >>> pkgdb -fu >>> ---> Updating the pkgdb >>> [Rebuilding the pkgdb <format:bdb_btree> in /var/db/pkg ... >>> >> /var/db/pkg/pkgdb.db: >unexpected file type or format -- Invalid argument: >> Cannot update the pkgdb!] >> >> man pkgdb says: >> BUGS >> Sometimes a database may get corrupt, and the pkgtools commands may >> abort >> with a segmentation fault. In such cases, run ``pkgdb -fu'' to >> rebuild >> the database, and the problems should go away. >> >> So what should I do now to upgrade ports? >> >> Yuri >> >> -- error log during portupgrade -- >> /var/db/pkg/pkgdb.db: unexpected file type or format -- Invalid argument >> ** Command failed [exit code 1]: /usr/local/sbin/pkgdb -aFOQ >> ---> Skipping 'net/openldap23-client' >> ---> Reinstalling 'tcl-8.4.16,1' (lang/tcl84) Yes, it's partly caused by pkgdb and/or how Ruby / pkgdb handles the DB I think... 1. What type of BDB structure do you use [most likely btree(1) -- says this during the pkgdb rebuild..]? 2. What version of BDB are you using (1.85, 2.x or 4.x) [(cd /usr/ports/ports-mgmt/portinstall && make config) will give you that info]? 3. uname -a says? -Garrett
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?474F8191.5080807>