FreeBSD

10 views
Skip to first unread message

Scott Shawcroft

unread,
Jul 29, 2009, 11:40:54 AM7/29/09
to oswat...@googlegroups.com
Is anyone familiar with FreeBSD?  I recently added it but I'm not convinced I'm crawling it right.  Would someone mind looking into it?
Thanks,
Scott

Seo Sanghyeon

unread,
Jul 29, 2009, 12:30:53 PM7/29/09
to oswat...@googlegroups.com
2009/7/30 Scott Shawcroft <scott.s...@gmail.com>:

> Is anyone familiar with FreeBSD?  I recently added it but I'm not convinced
> I'm crawling it right.  Would someone mind looking into it?

You are parsing FreeBSD port INDEX, right? AFAIK that is the right way to go.

On the other hand, you seem to use the first field to get the package
name, and that's the wrong way to go. IIRC you should use the second
field (/usr/ports/category/package), since that is the unique key.
e.g.

amarok-1.4.10_3|/usr/ports/audio/amarok
amarok-2.0.2_2|/usr/ports/audio/amarok-kde4

--
Seo Sanghyeon

wombat

unread,
Jul 29, 2009, 5:27:20 PM7/29/09
to OSWatershed
I'm not sure how you are crawling it right now. Parsing the INDEX file
is a good method, but keep in mind that it is not updated
automatically when a FreeBSD port is updated. You can fetch it
periodically (daily?) from http://www.freebsd.org/ports/INDEX-7.bz2
(or -8.bz2).

Freshports - http://www.freshports.org/ - is a site that tracks
FreeBSD port updates real-time. You can compare overall statistics or
individual ports with that site.

Scott Shawcroft

unread,
Jul 30, 2009, 1:25:26 AM7/30/09
to oswat...@googlegroups.com
Seo,
Is the second field that is used to install in FreeBSD?  The first seems more like I want because in your example they both are really just amarok.  However, I do want to use the names from the users perspective.
~Scott

Scott Shawcroft

unread,
Jul 30, 2009, 1:26:42 AM7/30/09
to oswat...@googlegroups.com
Right, I ran across some documentation that said that.  How often is it updated?  I only crawl it every 6 hours.  Otherwise I could do ports tree traversal similar to the Portage stuff for Gentoo.
~Scott

wombat

unread,
Jul 30, 2009, 1:55:31 AM7/30/09
to OSWatershed
The INDEX used to be updated every three hours. Probably still is,
although it may have gotten a bit faster. Fetching it every 6 hours
should be fine.

Scott Shawcroft

unread,
Jul 30, 2009, 1:58:40 AM7/30/09
to oswat...@googlegroups.com
Awesome.  Less work for me.  :-)
~Scott
Reply all
Reply to author
Forward
0 new messages