From owner-freebsd-ports@FreeBSD.ORG Fri Apr 3 13:49:11 2009 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 CB2CA106564A; Fri, 3 Apr 2009 13:49:11 +0000 (UTC) (envelope-from kamikaze@bsdforen.de) Received: from mail.bsdforen.de (bsdforen.de [212.204.60.79]) by mx1.freebsd.org (Postfix) with ESMTP id 8974C8FC15; Fri, 3 Apr 2009 13:49:11 +0000 (UTC) (envelope-from kamikaze@bsdforen.de) Received: from mobileKamikaze.norad (unknown [88.130.213.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bsdforen.de (Postfix) with ESMTP id 4D39F8A00D1; Fri, 3 Apr 2009 15:49:10 +0200 (CEST) Message-ID: <49D613D3.4050405@bsdforen.de> Date: Fri, 03 Apr 2009 15:49:07 +0200 From: Dominic Fandrey User-Agent: Thunderbird 2.0.0.21 (X11/20090321) MIME-Version: 1.0 To: pav@FreeBSD.org References: <49CE6B06.8080402@bsdforen.de> <1238446459.17527.4.camel@hood.oook.cz> <49D2956A.20106@bsdforen.de> <1238573306.66242.1.camel@pav.hide.vol.cz> <49D5DAFF.9030304@bsdforen.de> <1238753820.66242.26.camel@pav.hide.vol.cz> In-Reply-To: <1238753820.66242.26.camel@pav.hide.vol.cz> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 8bit Cc: freebsd-ports@FreeBSD.org Subject: Re: LATEST_LINK not in index 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: Fri, 03 Apr 2009 13:49:12 -0000 Pav Lucistnik wrote: > Dominic Fandrey píše v pá 03. 04. 2009 v 11:46 +0200: >> Pav Lucistnik wrote: >>> Dominic Fandrey píše v st 01. 04. 2009 v 00:12 +0200: >>> >>>>> Upgrades are easy. Look up @comment ORIGIN line in +CONTENTS file of the >>>>> port being upgraded, then look up this value in second column of INDEX >>>>> file. >>>>> >>>> I don't see how this is connected to my question. >>>> >>>> I want people to be able to use LATEST_LINK to identify ports, >>>> e.g. apache for www/apache13, apache20 form www/apache20 and so >>>> forth. LATEST_LINK is a unique identifier, unfortunately >>>> neither recorded in the INDEX nor +CONTENTS. >>>> Also, to read it from +CONTENTS (if it were there) I'd have to >>>> know, which package is actually meant, which I don't know, >>>> because this is the information I want to find out. >>> Maybe you really want people to specify ports by ORIGIN, not by >>> LATEST_LINK ... >>> >> Actually I want people to be able to do both. Since this is a >> binary package only tool, I want people to be able to use the >> same parameters as they'd be able to use with "pkg_add -r". >> >> I have implemented some guessing by now and it fails very rarely. >> But it's not the kind of solution I like. > > You could ls -l Latest/ directory on the ftp server and parse the > output, but it's a huge hack.. > That's actually trivial with netcat, I'm alread checking age and size of the index file on the server to find out weather I need to download a new copy. But the trouble is that I have to download the package so that I can get the origin from the +CONTENTS file. Internally the origin is used as the package identifier to access the index file. So I'd have to wait for the download before I could do any dependency checking. Possible, but it feels clumsy.