Ports: Portupgrade -aF Failing…


swinful2# portupgrade -aF
cd: can't cd to /usr/ports/sysutils/portupgrade
[missing key: categories] [Updating the portsdb in /usr/ports ... - 16503 port entries found .........1000.........2000.........3000.........4000.........5000.........6000.........7000.........8000.........9000.........10000.........11000.........12000.........13000.........14000.........15000.........16000..... ..... done]
missing key: categories: Cannot read the portsdb!
/usr/local/lib/ruby/site_ruby/1.8/portsdb.rb:548:in `open_db': database file error (PortsDB::DBError)
from /usr/local/lib/ruby/site_ruby/1.8/portsdb.rb:702:in `port'
from /usr/local/lib/ruby/site_ruby/1.8/portsdb.rb:890:in `all_depends_list'
from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:809:in `tsort_build'
from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:801:in `each'
from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:801:in `tsort_build'
from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:823:in `sort_build'
from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:827:in `sort_build!'
from /usr/local/sbin/portupgrade:721:in `main'
from /usr/local/lib/ruby/1.8/optparse.rb:755:in `initialize'
from /usr/local/sbin/portupgrade:220:in `new'
from /usr/local/sbin/portupgrade:220:in `main'
from /usr/local/sbin/portupgrade:2084

Looking at /usr/ports/UPDATING I notice:

20070205:
AFFECTS: everybody
AUTHOR: pav@FreeBSD.org
New ports category was created - /usr/ports/ports-mgmt

Most significant port moved to this new category is portupgrade.
So don’t be alarmed, it was not deleted. You can find it now in

/usr/ports/ports-mgmt/portupgrade

Let’s see if removing then reinstall will fix the problem. This is probably not the best wey, but let’s give it a try:


swinful2# pkg_info | grep portupgrade
portupgrade-2.2.2,2 FreeBSD ports/packages administration and management tool s

swinful2# pkg_deinstall portupgrade-2.2.2,2
cd: can’t cd to /usr/ports/sysutils/portupgrade
cd: can’t cd to /usr/ports/sysutils/portupgrade
—> Deinstalling ‘portupgrade-2.2.2,2’
[Updating the pkgdb <format:bdb_btree> in /var/db/pkg … – 685 packages found (-1 +0) (…) done]
swinful2# pkg_info | grep portupgrade

swinful2# cd /usr/ports/ports-mgmt/portupgrade
swinful2# make install clean
…edited…
===> Installing ldconfig configuration file
if [ ! -f /usr/local/etc/pkgtools.conf ]; then /bin/cp -p /usr/local/etc/pkgtools.conf.sample /usr/local/etc/pkgtools.conf; fi
/bin/mkdir -p /usr/local/lib/compat/pkg
===> Registering installation for portupgrade-2.2.2_4,2
===> Cleaning for ruby+pthreads-1.8.5.12,1
===> Cleaning for ruby18-bdb-0.6.0
===> Cleaning for perl-5.8.8
===> Cleaning for db41-4.1.25_4
===> Cleaning for portupgrade-2.2.2_4,2


swinful2# portupgrade -aF
[Updating the pkgdb in /var/db/pkg ... - 686 packages found (-0 +1) . done]
[missing key: categories] [Updating the portsdb in /usr/ports ... - 16503 port entries found .........1000.........2000.........3000.........4000.........5000.........6000.........7000.........8000.........9000.........10000.........11000.........12000.........13000.........14000.........15000.........16000..... ..... done]
---> Skipping 'bsdpan-CPAN-1.87' because it is held by user (specify -f to force)
---> Fetching the distfile(s) for 'curl-7.16.0_1' (ftp/curl)
---> Fetching '/usr/ports/ftp/curl'
===> Found saved configuration for curl-7.15.5_1

That seemed to fix it.

Advertisements
This entry was posted in *Nix. Bookmark the permalink.

6 Responses to Ports: Portupgrade -aF Failing…

  1. Dan Smith says:

    I ran into this today too. I hadn’t seen that the port moved, thanks for the tip.

  2. DM says:

    Hello.
    I also ran into this todays and it seems like doing the same what you did
    fixed it.
    Thank you.

  3. onioni says:

    Big Thanx! for you!!!!!!!!!!!

  4. Victoria says:

    Thanks! This was the first website that came up with the same error I got. Your solution fixed it! Thanks!!

  5. Scott says:

    I ran into this problem today. This was a big help. Thanks.

  6. JayY says:

    Yup, this did work for me today. Cracked my head in looking for why though. Thanks!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s