portsdb problem - BSD

This is a discussion on portsdb problem - BSD ; Hi All; Out of the blue portsdb has become foobar'd. I'm running 6.2 release on AMD64 bluebird# portupgrade -a [Updating the pkgdb in /var/db/pkg ... - 172 packages found (-0 +56) .................................................. ...... done] [missing key: categories] [Updating the portsdb ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: portsdb problem

  1. portsdb problem

    Hi All;

    Out of the blue portsdb has become foobar'd. I'm running 6.2 release on
    AMD64

    bluebird# portupgrade -a
    [Updating the pkgdb in /var/db/pkg ... - 172 packages
    found (-0 +56) .................................................. ......
    done]
    [missing key: categories] [Updating the portsdb in
    /usr/ports ... - 16414 port entries found
    ..........1000.........2000.........3000.........4 000.........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:BError)
    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

    The only change I've made recently is installing portsearch and running
    'portsearch -u'. I've tried the two recovery methods in the portupgrade
    man page (running pkgdb -fu, then if still borken deleting a file and
    running again) but without any luck.

    Can anyone offer me some advice

    Thanks

    Joel

  2. Re: portsdb problem

    Joel Mayes wrote:
    >
    > Can anyone offer me some advice
    >


    This is a well known problem, discussed at length on the
    ports@freebsd.org mailing lists. The consensus here is that portupgrde
    works when used with db-hash datababe instead of db-btree.


    > Thanks
    >
    > Joel


    --

    Michel TALON


  3. Re: portsdb problem

    Joel Mayes wrote:

    > Hi All;
    >
    > Out of the blue portsdb has become foobar'd. I'm running 6.2 release on
    > AMD64
    >
    > bluebird# portupgrade -a
    > [Updating the pkgdb in /var/db/pkg ... - 172 packages
    > found (-0 +56) .................................................. ......
    > done]
    > [missing key: categories] [Updating the portsdb in
    > /usr/ports ... - 16414 port entries found
    > .........1000.........2000.........3000.........40 00.........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:BError)
    > 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
    >
    > The only change I've made recently is installing portsearch and running
    > 'portsearch -u'. I've tried the two recovery methods in the portupgrade
    > man page (running pkgdb -fu, then if still borken deleting a file and
    > running again) but without any luck.
    >
    > Can anyone offer me some advice
    >
    > Thanks
    >
    > Joel


    I have the same problem. On the ports mail list a fix has been reported. It
    says to upgrade portupgrade to 2.2.2_2,2 and do portsdb -fu. Mine is
    currently 2.2.2,2 and as soon as the cvs mirrors are free I'll be giving it
    a try. Right now I think they are mirroring changes because the 3 I tried
    won't let me in.

    -Jason


  4. Re: portsdb problem

    Michel Talon wrote:

    [snip]
    >
    > This is a well known problem, discussed at length on the
    > ports@freebsd.org mailing lists. The consensus here is that portupgrde
    > works when used with db-hash datababe instead of db-btree.
    >

    [snip]

    Thanks! If the pending upgrade doesn't take care of it I will do this.

    -Jason


  5. Re: portsdb problem

    On 2007-02-01, Jason Bourne wrote:
    > Joel Mayes wrote:
    >
    >> Hi All;


    >> Can anyone offer me some advice
    >>
    >> Thanks
    >>
    >> Joel

    >
    > I have the same problem. On the ports mail list a fix has been reported. It
    > says to upgrade portupgrade to 2.2.2_2,2 and do portsdb -fu. Mine is
    > currently 2.2.2,2 and as soon as the cvs mirrors are free I'll be giving it
    > a try. Right now I think they are mirroring changes because the 3 I tried
    > won't let me in.
    >
    > -Jason


    Thanks Jason, all's fixed

  6. Re: portsdb problem

    Joel Mayes wrote:
    >
    > Can anyone offer me some advice
    >


    This is a well known problem, discussed at length on the
    ports@freebsd.org mailing lists. The consensus here is that portupgrde
    works when used with db-hash datababe instead of db-btree.

    In fact:
    On Thursday 01 February 2007 11:46:21 am Niclas Zeising wrote:
    >>This has been reported several times already, and I think it's solved
    >>in a more recent portupgrade.
    >>Have a look at this thread:
    >>http://lists.freebsd.org/pipermail/f...ry/038395.html
    >>And this commit to portupgrade:
    >>http://lists.freebsd.org/pipermail/c...ry/117217.html
    >>
    >>HTH!
    >>//Niclas


    I upgrade to portupgrade-2.2.2_2,2 and it worked


    > Thanks
    >
    > Joel


    --

    Michel TALON


  7. Re: portsdb problem

    On Thu, 01 Feb 2007 09:37:45 +0000, Michel Talon wrote:

    > Joel Mayes wrote:
    >>
    >> Can anyone offer me some advice
    >>

    >
    > This is a well known problem, discussed at length on the
    > ports@freebsd.org mailing lists. The consensus here is that portupgrde
    > works when used with db-hash datababe instead of db-btree.


    This can be enabled by adding the following to
    /usr/local/etc/pkgtools.conf:

    ENV['PKG_DBDRIVER'] ||= 'bdb_hash'

    HTH

    --
    Conrad J. Sabatier

+ Reply to Thread