PortsDB: a program that imports the ports tree into an SQLite database

From: Yuri <yuri_at_FreeBSD.org>
Date: Wed, 04 Jan 2023 22:30:59 UTC
Hi,


I developed the PortsDB project that imports FreeBSD ports into an 
SQLite database: https://github.com/yurivict/freebsd-portsdb
The port is ports-mgmt/portsdb.
The database can be fully rebuilt in ~20 minutes, after which in can be 
quickly (in seconds) updated with new commits.
The database is currently updated hourly: 
https://people.freebsd.org/~yuri/ports.sqlite


PortsDB can be used to query ports using SQL, as a relational database.
External services like Repology, FreshPorts, Portscout and similar can 
use PortsDB to access information in the ports tree.
Users can, for example, easily find their broken ports, or port 
duplicates, or all ports that they maintain that use gmake, among many 
other possible queries.
Such queries aren't easy to perform grepping the ports tree.
Cross-DB queries are also easy to do, combining PortsDB and 
/var/db/pkg/repo-FreeBSD.sqlite and /var/db/pkg/local.sqlite.

All that needs to be done to run PortsDB is ./import.sh and then ./update.sh



Regards,
Yuri