Doing SQL to the FreeBSD ports index

rflynn at rflynn at
Sat Jan 28 02:05:48 UTC 2012


> Apropos nothing much at all, but congruent with some of the discussion
> going on in this list at the moment, I've been playing around loading
> ports index related data into a RDBMS and querying that to pull out
> interesting factoids, or indeed a complete INDEX file.  I didn't start
> doing this with any idea other than my own edification but now it seems
> it might be vaguely useful here and there, so I've stuck a copy on my
> website:
> I'd be happy to hear from anyone using this, or receive bug reports /
> feature requests.

I haven't looked in detail - perl has to leave my head - but what I think
is a good feature for a database to handle is to find outdated distfiles.

Since the relationship between a portorigin and it's distfile(s) is not
available otherwise. I realize portmaster uses /var/db/ports for it, yet
if you share $PORTSDIR but not $PORT_DBDIR (different machines, different
requirements) then this method gets ugly fast. Quick parse of distinfo
should do the trick. Record the hash and you can get bonus points for
indicating hash errors (incomplete aborted downloads or upstream changed

-- Mel

More information about the freebsd-ports mailing list