My interactive version of pkg_add

Garrett Cooper yanefbsd at gmail.com
Mon Sep 29 15:16:58 UTC 2008


On Mon, Sep 29, 2008 at 4:39 AM, Marin Atanasov <dnaeon at gmail.com> wrote:
> Michel Talon wrote:
>
>> I can only concur with the suggestion you mention, exploring ftp sites
>> to discover what is available here. How to do that efficiently is
>> harder. Apparently "official" FreeBSD ftp sites have an INDEX of
>> available packages. I hope it is reliable. Then i suggest to download it
>> and work from that.
>
> Yes, that's the most reasonable approach. First I thought to write some
> functions using libcurl
> to fetch from and navigate the FTP server, but I think that it will be
> better if I stick to the main principle of
> developing in Unix - simple tools combined together to solve some complex
> task.
> That's why I think that if I keep the program's code as clean and simple as
> possible it would become a
> useful tool (maybe :)), so for downloading the INDEX file fetch would do the
> job :) After all the idea
> about the program was to provide some interactive interface to pkg_add, and
> not to rediscover the tools
> which are already in the base system :)

Try fetch(3).

> Anyway tomorrow (or today perhaps) I'll have a working version of the
> program which searches an FTP server for a given package pattern and I'll
> post back the code.

You can get all of this information, again, from INDEX with or without pkg_info.

-Garrett


More information about the freebsd-ports mailing list