pkgdb -F

Kent Stewart kstewart at
Wed May 28 07:31:30 PDT 2003

On Wednesday 28 May 2003 05:43 am, Jonathan Arnold wrote:
> I'm trying to clean up my pkgdb, so I'm going to take it one step
> at a time. First, is there any useful documentation on this? The
> man page is rather sparse on how to answer the questions that
> pop up.

There are a couple of things that I do. I have a few aliases that help me 
maintain my ports. They link to tools such as "portversion -c" and do a "make 
search". I symplified make search to

# cat search
#! /bin/sh
cd /usr/ports
make search name=$1

I only run pkgdb -F when portupgrade tells me to. To use the portupgrade 
tools, you have to have current versions of INDEX and INDEX.db. This means 
that you either run "make index; portsdb -u" or "portsdb -uU" everytime you 
cvsup ports-all. If you refuse ports or don't use ports-all, make index will 
most likely fail. I use the "make index" sequence.

The current version of INDEX is 10-days old and INDEX-5 is 11-days old. This 
is really pretty current for both versions of INDEX but it is way out of date 
for maintaining your ports. If they upgraded the INDEXs everytime a change 
was made to the port system bento would be spending most of its time running 
"make index".

Since I regenerate INDEX* everytime I cvsup ports-all, I added ports/INDEX to 
my refuse file. This can save several minutes of redownloading something that 
I am going to recreate.

> For instance, when I run:
> $ pkgdb -F
> I get the following output to start with:
> > --->  Checking the package registry database
> > Stale origin: 'multimedia/libmpeg2': perhaps moved or obsoleted.
> > Skip this for now? [yes] no
> > no
> > Browse CVSweb for the port's history? [no]
> >
> > Guessing... no idea.
> > Not in due form <category/portname>:
> > Fixed. (-> multimedia/libmpeg2)
> > Stale dependency: p5-CGI-Application-2.3 -> p5-Test-Harness-2.26
> > (devel/p5-Test-Harness): p5-Test-Simple-0.47 (score:53%) ?
> > ([y]es/[n]o/[a]ll) [no]
> What does "Stale origin" mean and how do I get rid of it?
> What does "Stale dependency" mean and how do I get rid of it? I take
> it to mean in this case that p5-CGI-Application-2.3 depends on
> p5-Test-Harness-2.26, and the latter is missing? old? unknown?
> And I think it is trying to tell me that a possible replacement is
> p5-Test-Simple-0.47. How do I tell if it is correct?

If you run "portversion -c", you will probably find that there is now a 
version ..-0.47_1 and you need to upgrade it to the "_1" version. If 
portversions dies, then you can do a "make search" on p5-CGI-Application-2.3 
and see the chain that it needs to point to and then run "pkgdb -F" and fix 
the dependancy chain.

If you let your ports get too far out of touch, you may have to delete a port 
and its dependancies and reinstall it. The current version of portupgrade 
does a good job most of the time but there are times when it simply givers up 
and you have to fix things on your own. At this point, you need to understand 
the port system, which is described in chapter 4 in the Handbook.


Kent Stewart
Richland, WA

More information about the freebsd-questions mailing list