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

From: Nuno Teixeira <>
Date: Thu, 05 Jan 2023 09:50:05 UTC
Hello Yuri!


error: the PORTSDIR environment variable should point to a valid ports tree
Usage: /usr/local/bin/portsdb-import <db.sqlite> <file.sql> [{sync|async}]

Any clues?

I don't work with SQL for about 20 years, any simple commands to start with
as an example?

I usaually use grep and portgrep but this tools promises that we can do
deep search within ports.
Thats what I looking for!


Yuri <> escreveu no dia quarta, 4/01/2023 à(s) 22:31:

> Hi,
> I developed the PortsDB project that imports FreeBSD ports into an
> SQLite database:
> 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:
> 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 ./ and then
> ./
> Regards,
> Yuri

Nuno Teixeira
FreeBSD Committer (ports)