• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

[FreeBSD 5.2] portsdb -u failure

#1
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!
 

j79zlr

Glaanies script monkey
Political User
#2
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'
 

j79zlr

Glaanies script monkey
Political User
#4
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
 
#8
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.

:(
 

j79zlr

Glaanies script monkey
Political User
#9
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
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?
 

j79zlr

Glaanies script monkey
Political User
#11
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.
 

j79zlr

Glaanies script monkey
Political User
#14
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.
 

j79zlr

Glaanies script monkey
Political User
#16
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.
 

j79zlr

Glaanies script monkey
Political User
#17
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
[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.
 

Members online

No members online now.

Latest posts

Latest profile posts

Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,961
Messages
673,239
Members
89,014
Latest member
sanoravies