[FreeBSD 5.2] portsdb -u failure

Discussion in 'Linux & BSD' started by Glaanieboy, Sep 20, 2004.

  1. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    Looks like ruby is the culprit. I did have problems while installing portupgrade from the ports tree. Portupgrade stopped with an error saying something is wrong in Openssl and I should install it with WITH_OPENSSL_BASE. So I typed in make install clean -DWITH_OPENSSL_BASE and it installed fine. Then I wanted to upgrade the portsdatabase with portsdb -u, but it resulted in the above error. What to do now? Should I reinstall ruby18? Should I load a patch (how do I do that)? Help me!
     
  2. j79zlr

    j79zlr Glaanies script monkey Political User

    Messages:
    2,725
    Location:
    Chicago
    Its a problem with ruby, they are working on a fix, but the hack is to add these lines to /usr/local/etc/pkgtools.conf

    ENV['PKG_DBDRIVER'] = 'bdb_btree'
    ENV['PORTS_DBDRIVER'] = 'bdb_btree'
     
  3. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    Where should I add it? I added it in the beginning of the file, but it still generates the error.
     
  4. j79zlr

    j79zlr Glaanies script monkey Political User

    Messages:
    2,725
    Location:
    Chicago
    after you add those lines, make sure you remove these files

    /usr/ports/INDEX
    /usr/ports/INDEX.db
    /usr/ports/INDEX-5
    /var/db/pkg/pkgdb.db

    Now rerun cvsup and build the indexes

    cvsup -L 2 supfile
    cd /usr/ports
    make index
    portsdb -u
    pkgdb -F
     
  5. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    Thanks, will do that tomorrow, it's getting quite late here.
     
  6. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    If that does not work, cd /usr/ports/security/openssl

    and compile it. That will fix all your openssl issues.
     
  7. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    It's ruby18 that's giving the errors. Or does openssl use ruby18 as a dependency?
     
  8. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    I first followed j79zlr's guide, but that resulted in the same error.
    Your option resulted in portsdb -u not generating an error (it appears to do nothing), now portsversion -l "<" says something about the portsdb being in the wrong format, then it lists all entries in INDEX, INDEX-5 and INDEX.db (like /usr/ports/<file>:<number>:, where <file> is either INDEX, INDEX-5 or INDEX.db and <number> is a number between 0 and 11000'ish), giving errors that it can't update the previously mentioned files and generates the same error as in my first post in the end.

    :(
     
  9. j79zlr

    j79zlr Glaanies script monkey Political User

    Messages:
    2,725
    Location:
    Chicago
    ok, leave those variables set in pkgtools.conf and install the ruby-bdb port, I had to do that in 4.x, but just adding the variables in 5.x fixed it for me.
     
  10. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    FIXED! Thank you very much. Installing the ruby-bdb port did the trick. I still don't understand what installing a ruby-bdb port has to do with the ports database. But a better question is, what the heck is/does ruby?
     
  11. j79zlr

    j79zlr Glaanies script monkey Political User

    Messages:
    2,725
    Location:
    Chicago
    Ruby's just another scripting language, somehow forming the database with bdb version 1 or earlier dumps, a later version [ruby-bdb installs version 4] doesn't have this problem. Not exactly sure what the exact problem is, only it core dumps.
     
  12. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    Hmm, anyway, it's fixed. Thanks again :D
     
  13. LordOfLA

    LordOfLA Godlike!

    Messages:
    7,027
    Location:
    Maidenhead, Berkshire, UK
    my advice would be to install /usr/ports/sysutils/portupgrade

    run portsdb -uU

    run portupgrade -rRa

    be happy
     
  14. j79zlr

    j79zlr Glaanies script monkey Political User

    Messages:
    2,725
    Location:
    Chicago
    I never recommend using portsdb -uU, it fails alot, use

    portsdb -u <--to build the ports database
    cd /usr/ports && make index <-- to build the ports index, portsdb -U does not do as good of a job.
     
  15. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    Doesn't matter now. I have just upgraded all outdated ports, right now it's compiling a fresh new kernel.
     
  16. j79zlr

    j79zlr Glaanies script monkey Political User

    Messages:
    2,725
    Location:
    Chicago
    I always use portupgrade -arR, it doesn't upgrade anything that doesn't need to be upgraded. I also set my make variables in pkgtools.conf ;) so they are issued doing an upgrade.
     
  17. j79zlr

    j79zlr Glaanies script monkey Political User

    Messages:
    2,725
    Location:
    Chicago
    I donno, I don't really issue that many make options anyways, it should also be noted if you set options in pkgtools.conf, make install clean does not read them, so you would have to do, e.g to install mozilla, portinstall www/mozilla

    I don't see how setting them in pkgtools.conf in anymore troublesome than make WITH_SOMETHING=yes :shrugs:
     
  18. LordOfLA

    LordOfLA Godlike!

    Messages:
    7,027
    Location:
    Maidenhead, Berkshire, UK
    [edit]Removed the stuff[/edit]

    if one does as j79zlr saiys and puts pkg build options in /etc/pkgtools.conf you can use portintstall to install stuff and portupgrade -rRa to recursivley upgrade all ports with your make command line options.

    saves you alot of time and effort.
     
  19. j79zlr

    j79zlr Glaanies script monkey Political User

    Messages:
    2,725
    Location:
    Chicago
    thats /usr/local/etc/pkgtools.conf
     
  20. LordOfLA

    LordOfLA Godlike!

    Messages:
    7,027
    Location:
    Maidenhead, Berkshire, UK
    true enough. I put mine in /etc. should move it sometime