Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Jan 2023 09:50:05 +0000
From:      Nuno Teixeira <eduardo@freebsd.org>
To:        Yuri <yuri@freebsd.org>
Cc:        ports <freebsd-ports@freebsd.org>
Subject:   Re: PortsDB: a program that imports the ports tree into an SQLite database
Message-ID:  <CAFDf7UKk0hfyXEZYY965-qw%2B_5_bNpnAt%2Bdwe0Ejbp_sSqbEoQ@mail.gmail.com>
In-Reply-To: <f84e138d-46f7-9353-112f-492b1460c3c3@tsoft.com>
References:  <f84e138d-46f7-9353-112f-492b1460c3c3@tsoft.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000006ba17d05f1813a90
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hello Yuri!

/etc/make.conf:
PORTSDIR=3D/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 =C3=A0(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
>
>
>

--=20
Nuno Teixeira
FreeBSD Committer (ports)

--0000000000006ba17d05f1813a90
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hello Yuri!</div><div><br></div><div>/etc/make.conf:<=
br></div><div>PORTSDIR=3D/work/freebsd/ports/main</div><div><br></div><div>=
`portsdb-import`:<br></div><div>error: the PORTSDIR environment variable sh=
ould point to a valid ports tree<br>Usage: /usr/local/bin/portsdb-import &l=
t;db.sqlite&gt; &lt;file.sql&gt; [{sync|async}]</div><div><br></div><div>An=
y clues?</div><div><br></div><div>I don&#39;t work with SQL for about 20 ye=
ars, any simple commands to start with as an example?</div><div><br></div><=
div>I usaually use grep and portgrep but this tools promises that we can do=
 deep search within ports.</div><div>Thats what I looking for!</div><div><b=
r></div><div>Cheers!<br></div></div><br><div class=3D"gmail_quote"><div dir=
=3D"ltr" class=3D"gmail_attr">Yuri &lt;<a href=3D"mailto:yuri@freebsd.org">=
yuri@freebsd.org</a>&gt; escreveu no dia quarta, 4/01/2023 =C3=A0(s) 22:31:=
<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8=
ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
<br>
I developed the PortsDB project that imports FreeBSD ports into an <br>
SQLite database: <a href=3D"https://github.com/yurivict/freebsd-portsdb" re=
l=3D"noreferrer" target=3D"_blank">https://github.com/yurivict/freebsd-port=
sdb</a><br>
The port is ports-mgmt/portsdb.<br>
The database can be fully rebuilt in ~20 minutes, after which in can be <br=
>
quickly (in seconds) updated with new commits.<br>
The database is currently updated hourly: <br>
<a href=3D"https://people.freebsd.org/~yuri/ports.sqlite" rel=3D"noreferrer=
" target=3D"_blank">https://people.freebsd.org/~yuri/ports.sqlite</a><br>;
<br>
<br>
PortsDB can be used to query ports using SQL, as a relational database.<br>
External services like Repology, FreshPorts, Portscout and similar can <br>
use PortsDB to access information in the ports tree.<br>
Users can, for example, easily find their broken ports, or port <br>
duplicates, or all ports that they maintain that use gmake, among many <br>
other possible queries.<br>
Such queries aren&#39;t easy to perform grepping the ports tree.<br>
Cross-DB queries are also easy to do, combining PortsDB and <br>
/var/db/pkg/repo-FreeBSD.sqlite and /var/db/pkg/local.sqlite.<br>
<br>
All that needs to be done to run PortsDB is ./import.sh and then ./update.s=
h<br>
<br>
<br>
<br>
Regards,<br>
Yuri<br>
<br>
<br>
</blockquote></div><br clear=3D"all"><br>-- <br><div dir=3D"ltr" class=3D"g=
mail_signature"><div dir=3D"ltr"><span style=3D"color:rgb(102,102,102)">Nun=
o Teixeira<br>FreeBSD Committer (ports)</span></div></div>

--0000000000006ba17d05f1813a90--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFDf7UKk0hfyXEZYY965-qw%2B_5_bNpnAt%2Bdwe0Ejbp_sSqbEoQ>