[wplug-bsd] ports aren't upgrading

Bill Moran wmoran at potentialtech.com
Sat Nov 20 11:38:07 EST 2004


Brandon Kuczenski <brandon at 301south.net> wrote:

> I think I forgot how to do something.  First of all, there have been a lot
> of insecurities reported recently in ports I have installed (I'm up to 10
> now) and I was going to fix some of them tonight.  But when I tried to
> portupgrade xpdf, I got the report of a stale dependency.  It said to "run
> pkgdb -F to fix", except pkgdb -F just asks me what to do about the
> dependency, and I don't know.

Generally, this happens when 1 of two things happen:
1) You try to portupgrade after a long period of neglect
2) You try to portupgrade a section of the ports that has somehow changed
   radically.

> Then I got anxious about my package database not getting updated
> automatically, and I couldn't find anywhere in my /etc/periodic directory
> where pkgdb was run, even though I was almost *certain* that it was
> running regularly.

pkgdb doesn't run regularly.  pkgdb runs as needed (for example, portupgrade
will run it)

The pkgdb getting out of date doesn't really hurt anything, as any
utility that needs it will updated it first.  All the pkgdb is for is
to make it _faster_ to determine port dependencies and the like.

> And what do I do about the failed dependencies?  Here's the output from
> pkgdb -F:
> 
> [root at ocean periodic]# pkgdb -F
> --->  Checking the package registry database
> Duplicated origin: textproc/p5-XML-Parser - bsdpan-XML-Parser-2.34
> p5-XML-Parser-2.34_1
> Unregister any of them? [no]
> Duplicated origin: mail/p5-Mail-SpamAssassin -
> bsdpan-Mail-SpamAssassin-2.63 p5-Mail-SpamAssassin-2.64
> Unregister any of them? [no]
> Stale dependency: epiphany-1.2.3 -> mozilla-1.6_4,2 (www/mozilla):
> New dependency? (? to help):
> Skip this? ([y]es/[n]o/[a]ll) [yes]
> Skipped.
> Stale dependency: gnome2-lite-2.6.0 -> mozilla-1.6_4,2 (www/mozilla):
> Skip this? ([y]es/[n]o/[a]ll) [yes]
> Stale dependency: samba-3.0.5,1 -> heimdal-0.6.1 (security/heimdal):
> New dependency? (? to help):
> Skip this? ([y]es/[n]o/[a]ll) [yes]
> Skipped.
> Stale dependency: xpdf-3.00_4 -> gsfonts-8.11_2 (print/gsfonts):
> New dependency? (? to help):
> Skip this? ([y]es/[n]o/[a]ll) [yes]
> Skipped.

This has gotten pretty extensive.  I would take the following approach:
1) Back up all your configs for all packages.  Upgrading sometimes
   overwrites config files!
2) See how many of those packages are stale altogether.  I know I often
   end up with software installed that I'm not using.  pkg_delete anything
   that you don't need.  For example, do you use p5-XML-Parser?
3) Try pkgdb -aF (or --autofix) which may be able to fix some of those
   automatically.
4) For the ones that can't be fixed automatically, you have two choices:
   First, deinstall the package and reinstall it after you portupgrade.
   Second, use the pkgdb -F to tweak the package database so all looks
   well.  I recommend #1 in most cases, as it's usually easier, but it
   can take quite a bit longer (especially for things like Mozilla!)
   For the second, you basically need to tell the pkgdb where the port
   moved to, which requires some research on your part.

I'll admit that I'm easily confused by pkgdb errors as well.  My answer
is usually to pkg_delete the packages causing the problem and reinstall
them.  I also recommend the pkg_cutleaves port to help trim out ports
that don't serve any purpose anymore.  It helps to keep things from
getting this bad.

-- 
Bill Moran
Potential Technologies
http://www.potentialtech.com


More information about the wplug-bsd mailing list