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

From: Mehmet Erol Sanliturk <m.e.sanliturk_at_gmail.com>
Date: Thu, 05 Jan 2023 10:03:01 UTC
On Thu, Jan 5, 2023 at 12:50 PM Nuno Teixeira <eduardo@freebsd.org> wrote:

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


https://www.google.com/search?q=free+open+books+about+sqlite+database&sxsrf=ALiCzsZv1AJgR5UkUadj4f--jQ9kh0gXQg%3A1672912760855&source=hp&ei=eJ-2Y6LUMdaOxc8P4JGcYA&iflsig=AJiK0e8AAAAAY7atiNKf0anco-A8BtH3TLESAj9VyBwU&oq=free+open+books+about+sqlite&gs_lcp=Cgdnd3Mtd2l6EAEYADIFCCEQoAEyBQghEKABMgUIIRCgAToECCMQJzoNCC4QxwEQ0QMQ1AIQQzoECAAQQzoFCAAQgAQ6BQguEIAEOggILhCABBDUAjoLCC4QgAQQxwEQ0QM6CAgAEIAEEMsBOgoIABCABBAKEMsBOgYIABAWEB46CggAEBYQHhAPEAo6CAghEBYQHhAdOgsIIRAWEB4Q8QQQHToECCEQFToHCCEQoAEQClAAWMhgYIKWAWgAcAB4AIABrQGIAd0bkgEEMC4yOJgBAKABAQ&sclient=gws-wiz

free open books about sqlite database


With my best wishes .



Mehmet Erol Sanliturk






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