[FreeBSD 5.2] portsdb -u failure

Glaanieboy

OSNN Veteran Addict
Joined
6 Mar 2002
Messages
2,628
server1# /usr/local/sbin/portsdb -u
[Updating the portsdb <format:bdb1_btree> in /usr/ports ... - 11735 port entries found .........1000.........2000.........3000.........4000.........5000.........6000.........7000.........8000..../usr/local/lib/ruby/site_ruby/1.8/portsdb.rb:587: [BUG] Bus Error
ruby 1.8.2 (2004-07-29) [i386-freebsd5]

Abort (core dumped)
server1#

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!
 
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'
 
Where should I add it? I added it in the beginning of the file, but it still generates the error.
 
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
 
If that does not work, cd /usr/ports/security/openssl

and compile it. That will fix all your openssl issues.
 
X-Istence said:
If that does not work, cd /usr/ports/security/openssl

and compile it. That will fix all your openssl issues.
It's ruby18 that's giving the errors. Or does openssl use ruby18 as a dependency?
 
X-Istence said:
If that does not work, cd /usr/ports/security/openssl

and compile it. That will fix all your openssl issues.
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.

:(
 
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.
 
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?
 
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.
 
my advice would be to install /usr/ports/sysutils/portupgrade

run portsdb -uU

run portupgrade -rRa

be happy
 
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.
 
Doesn't matter now. I have just upgraded all outdated ports, right now it's compiling a fresh new kernel.
 
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.
 
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:
 
[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.
 
thats /usr/local/etc/pkgtools.conf
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back