pkgdb failures



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)
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Portupgrade
    ... First cd /var/db/pkg save the old pkgdb by ... everytime I run one of the portupgrade commands like pkgdb -u or -F, ... and a default database now set to use this version you can get portupgrade ... and set port options accordly. ...
    (freebsd-questions)
  • Re: Cant build bash3.1 during portupgrade -a
    ... Over a week ago I was trying to rebuild Xorg and ran into an issue with ... I did pkgdb -F then portupgrade -a in order ... When the 'make bash31' stopped on error the first time I ...
    (freebsd-questions)
  • Re: portupgrade
    ... g. "portupgrade xyz" never resulted in that problem ... ... > results in a repetitive rebuild of the package database whenever the ... > `Inappropriate file type or format'; rebuild needed] [Rebuilding the pkgdb ...
    (freebsd-questions)
  • Re: How best to recover from untimely portupgrade interruption?
    ... > Now if I rerun portupgrade, it restarts the index build but warns me ... > down the database builder. ... What I've done in cases like this (or any pkgdb inconsistencies) is ... pkgdb -F and answer the altogether-too-cryptic questions. ...
    (freebsd-questions)
  • Re: pkgdb.db locked
    ... Lee Capps wrote: ... pkgdb -fu is failing as well. ... Apparently the 'portupgrade' port was broken this morning. ...
    (freebsd-questions)