So, over the past couple days I’ve been looking over the db code under libc, trying to get a grasp on what needs to be done to get the packaging stuff up and running, and it turns out that my results have been fairly successful. In order to remain fully compatible with the ruby packaging tools I plan on first implementing BDB btree(3)’s (plus they’re simpler to quickly implement from what I’ve seen), and then take that info and work my way up to BDB hash(3) table.

I noticed that a little bit of the btree code could be reduced by using C macros, so I’ve done that. I need to run make on the db directory though and ensure that stuff passes on my machine before integrating the source into my remote tree. Anybody know of any software that uses BDB 1.85 and is in ports :)? Or I suppose I could use diff with the assembly code >_>..

Anyhow, after that I’ve been taking a look at the INDEX format currently in play with /usr/ports/INDEX-[5-7]. After some discussion and helpful pointers from Mark Linimon, Matthew Seaman, and Michel Talon, I’ve figured out that the formatting of the fields are as follows:


  1. pkgname

  2. path

  3. prefix

  4. comment

  5. descr

  6. maintainer

  7. categories

  8. build_deps

  9. run_deps

  10. website

  11. extract_deps

  12. patch_deps

  13. fetch_deps

Note: The above list was derived from http://www.lpthe.jussieu.fr/~talon/freebsdports.html#htoc11.

So, now all I need to do is write simple sprintf and sscanf one liners converting the strings in the DBT.data fields into the appropriate fields and pass the data along to the appropriate package utils. Easier said than done, but it shouldn’t be too bad.

Until next week :).

Add to del.icio.us - Digg this article

No Responses to “/usr/lib/libc/db/ and friends, and INDEX’es”  

  1. No Comments

Leave a Reply

You must log in to post a comment.