Weird portmaster behaviour -- everything fails to install

Andrew Reilly andrew-freebsd at
Tue Jul 28 09:43:33 UTC 2009

On Tue, Jul 28, 2009 at 09:23:03AM +0200, Václav Haisman wrote:
> Andrew Reilly wrote:
> > Problem solved!
> > 
> > In case anyone is interested, or has encountered a similar
> > problem, I believe that my problem was that somehow my
> > /var/db/pkg directory had a whole pile of near-duplicate entries
> > corresponding to port revisions.  Portmaster was checking the
> > installed version against the MD5 hashes in the "old" version
> > +CONTENTS file, and they weren't matching.  I assume that I
> > acquired all of these out-of-date pkg entries through a backup
> > restore mishap: I've been having gmirror issues lately (not
> > gmirror's fault, I think -- just a series of dodgy hard drives.)
> > 
> > All is good again.  No duplicate db/pkg entries at last, and
> > portmaster runs to completion as intended.
> How have you managed to fix the duplicate entries? Can pkgdb -Ffu or
> such fix that?

I think that pkgdb is a portupgrade mechanism, and portmaster
doesn't need it.  By "duplicate entries" I mean multiple
directories in the /var/db/pkg directory that differ only in
version number or port version number.

When I realized that this is what was going on, there were only
four such duplicates left, and I just deleted the older
directory of the pair, as that was the one that didn't match the
installed files.  All of the previous duplicates seemed to have
been tidied up (or removed) by the "make deinstall reinstall"

I did a final portmaster --check-depends, and that did a *lot*
of +REQUIRED_BY fixing, so I suspect that some of the previous
dependency notation must have been going into the incorrect
(older) versions (I guess that they sort first).



More information about the freebsd-stable mailing list