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

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

/etc/make.conf:
PORTSDIR=/work/freebsd/ports/main

`portsdb-import`:
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!

Cheers!

Yuri <yuri@freebsd.org> escreveu no dia quarta, 4/01/2023 à(s) 22:31:

> 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
>
>
>

-- 
Nuno Teixeira
FreeBSD Committer (ports)