package corrupt/whats the "official" way of dealing with?

Doug Barton dougb at
Mon Jun 5 10:45:06 PDT 2006

Achilleus Mantzios wrote:
> Hi,
> during a 6.0-BETA1 to 6.1-RELEASE-p1 upgrade cycle 
> and a subsequent
> portupgrade -PRr '*',
> (and most probably while doing the nvidia port),
> my system crashed and it left the /var/db/pkg system
> in a corrupted condition:
> pkg_info: the package info for package 'apache-ant-1.6.5' is corrupt


> None of the popular -f -u etc... pkgdb switches seem to remedy the 
> problem.
> What should i do?
> I am thinking of deleting the above dirs and installing those packages
> again.

Well, for cvsup you can just pkg_delete it and then do pkg_add -r cvsup. For
the rest, I saw this problem when I was developing portmaster when the files
in the /var/db/pkg/ directories did not have the right permissions. You can
try doing:

find /var/db/pkg/ -type f -exec chmod 644 {} \;

and see if that fixes it for you. If not, you are probably correct that you
will have to reinstall the ports/packages to fix it. If you're using ports,
and want to give portmaster a try, it will rebuild your dependency
information for you, assuming that there is any valid data in the pkg
directories to start with.

Hope that helps,



    This .signature sanitized for your protection

More information about the freebsd-ports mailing list