portupgrade: Cannot read the portsdb! - BSD

This is a discussion on portupgrade: Cannot read the portsdb! - BSD ; I'm new to FreeBSD and trying to update a system I installed yesterday (6.2-RELEASE). I have done a portsnap fetch extract update which took time but appears to have run successfully, followed by a portsdb -Fu which also appeared to ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: portupgrade: Cannot read the portsdb!

  1. portupgrade: Cannot read the portsdb!

    I'm new to FreeBSD and trying to update a system I installed yesterday
    (6.2-RELEASE).

    I have done a

    portsnap fetch extract update

    which took time but appears to have run successfully, followed by a

    portsdb -Fu

    which also appeared to run without problems, but when I try to use
    portsupdate this is what happens (some lines broken for legibility)

    $ sudo portupgrade -r gnupg
    Password:
    [missing key: categories] [Updating the portsdb in
    /usr/ports ... - 16517 port entries found
    ..........1000.........2000.........3000.........4 000.........5000
    ..........6000.........7000.........8000.........9 000.........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:567:in `open_db': database
    file error (PortsDB:BError)
    from /usr/local/lib/ruby/site_ruby/1.8/portsdb.rb:736:in `port'
    from /usr/local/lib/ruby/site_ruby/1.8/portsdb.rb:924:in
    `all_depends_list'
    from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:915:in
    `tsort_build'
    from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:907:in `each'
    from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:907:in
    `tsort_build'
    from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:929:in `sort_build'
    from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:933:in
    `sort_build!'
    from /usr/local/sbin/portupgrade:694:in `main'
    from /usr/local/lib/ruby/1.8/optparse.rb:755:in `initialize'
    from /usr/local/sbin/portupgrade:210:in `new'
    from /usr/local/sbin/portupgrade:210:in `main'
    from /usr/local/sbin/portupgrade:1981


    Any suggestions?

    -j

    --
    Jeffrey Goldberg http://www.goldmark.org/jeff/
    I rarely read top-posted, over-quoted or HTML posts
    My Reply-To address is valid.

  2. Re: portupgrade: Cannot read the portsdb!

    Jeffrey Goldberg wrote:

    > I'm new to FreeBSD and trying to update a system I installed yesterday
    > (6.2-RELEASE).
    >
    > I have done a
    >
    > portsnap fetch extract update
    >
    > which took time but appears to have run successfully, followed by a
    >
    > portsdb -Fu
    >
    > which also appeared to run without problems, but when I try to use
    > portsupdate this is what happens (some lines broken for legibility)
    >
    > $ sudo portupgrade -r gnupg
    > Password:
    > [missing key: categories] [Updating the portsdb in
    > /usr/ports ... - 16517 port entries found
    > .........1000.........2000.........3000.........40 00.........5000
    > .........6000.........7000.........8000.........90 00.........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:567:in `open_db': database
    > file error (PortsDB:BError)
    > from /usr/local/lib/ruby/site_ruby/1.8/portsdb.rb:736:in `port'
    > from /usr/local/lib/ruby/site_ruby/1.8/portsdb.rb:924:in
    > `all_depends_list'
    > from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:915:in
    > `tsort_build'
    > from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:907:in `each'
    > from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:907:in
    > `tsort_build'
    > from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:929:in
    > `sort_build' from
    > /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:933:in
    > `sort_build!'
    > from /usr/local/sbin/portupgrade:694:in `main'
    > from /usr/local/lib/ruby/1.8/optparse.rb:755:in `initialize'
    > from /usr/local/sbin/portupgrade:210:in `new'
    > from /usr/local/sbin/portupgrade:210:in `main'
    > from /usr/local/sbin/portupgrade:1981
    >
    >
    > Any suggestions?
    >
    > -j
    >



    This looks like the problem in portupgrade that was recently fixed. Since I
    haven't moved up to portsnap and still using the old cvsup-without-gui I
    can't comment on portsnap. But with a freshly updated ports tree if you
    look at the Makefile in /usr/ports/ports-mgmt/portupgrade check that the
    version is 2.2.2_4,2.

    Update your ports tree, cd to above, and make && make deinstall && make
    reinstall should fix it if the version of portupgrade you're currently
    using is less than 2.2.2_4,2

    -Jason


  3. Re: portupgrade: Cannot read the portsdb!

    Jason Bourne wrote:

    > [...] with a freshly updated ports tree if you look at the Makefile
    > in /usr/ports/ports-mgmt/portupgrade check that the version is
    > 2.2.2_4,2.


    That was the problem.

    > Update your ports tree, cd to above, and make && make deinstall && make
    > reinstall should fix it if the version of portupgrade you're currently
    > using is less than 2.2.2_4,2


    And this has fixed it. Thank you.

    -j

    --
    Jeffrey Goldberg http://www.goldmark.org/jeff/
    I rarely read top-posted, over-quoted or HTML posts
    My Reply-To address is valid.

+ Reply to Thread