From owner-freebsd-ports@FreeBSD.ORG Mon Sep 29 15:16:57 2008 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4B471065686 for ; Mon, 29 Sep 2008 15:16:57 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.173]) by mx1.freebsd.org (Postfix) with ESMTP id 69EE98FC0A for ; Mon, 29 Sep 2008 15:16:57 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by ug-out-1314.google.com with SMTP id m2so371210uge.39 for ; Mon, 29 Sep 2008 08:16:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=MC+FxoX73ONJHZZE9xwG70KZn4e0emgpGSLxEJP40gE=; b=SPVf2j3vlJ+iyusVZ7OTM+2i0rfU18OySM+tJX20bV7bRa5BMis7bBXSfNuY38FDza RhjQ2ejaIevzi7Ju1g6xzuypw5+lD3my1EDOcq5kpqgC7LFhqNY4GiV79O/qqK1tnu7w 1YwuPqvFTTk5KaebI7yv8eK/tHcGKu7reJ7xM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=kaNagn4M7JZMWDKByhBYJ1VJYmN3DjGR1tfKsbxYB60pPsCrDmlFOxTZFBuYhmkuSt 9wAgbD9RsGyriZsKF0c/FnbyL9bmr2WEQppINVjgy5mF4dcwouNqYI2hmwNBvlOXCeoU ty+ogCuoISA7c/yMx/eDgUyko7iaAUi3sQUM0= Received: by 10.67.19.17 with SMTP id w17mr488454ugi.3.1222701415889; Mon, 29 Sep 2008 08:16:55 -0700 (PDT) Received: by 10.66.251.1 with HTTP; Mon, 29 Sep 2008 08:16:55 -0700 (PDT) Message-ID: <7d6fde3d0809290816v725f602l77b90b28bf5b1a72@mail.gmail.com> Date: Mon, 29 Sep 2008 08:16:55 -0700 From: "Garrett Cooper" To: "Marin Atanasov" In-Reply-To: <48E0BE6F.7000105@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <48E0BE6F.7000105@gmail.com> Cc: freebsd-ports@freebsd.org Subject: Re: My interactive version of pkg_add X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Sep 2008 15:16:58 -0000 On Mon, Sep 29, 2008 at 4:39 AM, Marin Atanasov 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