From owner-freebsd-ports@FreeBSD.ORG Tue Dec 5 22:26:50 2006 Return-Path: X-Original-To: ports@freebsd.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B78FA16A407; Tue, 5 Dec 2006 22:26:50 +0000 (UTC) (envelope-from wxs@atarininja.org) Received: from syn.atarininja.org (syn.csh.rit.edu [129.21.60.158]) by mx1.FreeBSD.org (Postfix) with ESMTP id EC7B743CBB; Tue, 5 Dec 2006 22:26:06 +0000 (GMT) (envelope-from wxs@atarininja.org) Received: by syn.atarininja.org (Postfix, from userid 1001) id 2ACD05C57; Tue, 5 Dec 2006 17:27:33 -0500 (EST) Date: Tue, 5 Dec 2006 17:27:33 -0500 From: Wesley Shields To: Doug Barton Message-ID: <20061205222733.GA42597@atarininja.org> References: <456B70E9.4030408@FreeBSD.org> <20061204213106.GA42084@atarininja.org> <45749998.3070308@FreeBSD.org> <20061204232125.GA42307@atarininja.org> <790a9fff0612050838s66c655fapfde80d4038f64ca2@mail.gmail.com> <20061205172803.GA51892@atarininja.org> <4575C568.70905@FreeBSD.org> <20061205194146.GC52966@atarininja.org> <20061205203120.GA53894@atarininja.org> <4575EBA8.3020601@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4575EBA8.3020601@FreeBSD.org> User-Agent: Mutt/1.5.13 (2006-08-11) Cc: ports@freebsd.org Subject: Re: distfile belongs to? 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: Tue, 05 Dec 2006 22:26:50 -0000 On Tue, Dec 05, 2006 at 01:59:04PM -0800, Doug Barton wrote: > Wesley Shields wrote: > > >> I'd like to finalize how it should look in +CONTENTS before I make this > >> change, but it will get done eventually. :) > >> > >> One way I was exploring is adding > >> > >> @comment DISTFILE:$filename:$size:$md5:$sha256 > > I think that's good, the other information might come in handy down > the road. One thing you might want to consider is to put the md5 sum > at the end, since at some point down the road (maybe years from now, > but still ...) we're likely to drop md5 altogether. Good idea. :) > >> into the generated plist. This way we shouldn't have to change > >> pkg_create and only modify pkg_info and other tools. I haven't tested > >> this fully but it was just a fairly easy and concise way that I believe > >> will work. By adding it to +CONTENTS using some type of @comment line we > >> can avoid changing pkg_create and make for easier adoption. The only > >> changes that will need to be made will be to those programs which > >> process +CONTENTS directly, and even those modifications will be > >> minimal. > > I think you're probably right about this, but I'd like to hear from > some people who are more knowledgeable about the port's internals than > I am first. As would I. I'll give it a few days before I send-pr anything. If nothing else it will get discussed then. > I should have spoken up earlier, but you have a couple of > inefficiencies and duplicated code that doesn't have to be there. Take > a look at the attached, which also implements the change I mentioned > above. Also, for something like this where you just need the Nth > element of a line that is in a standard format, cut(1) is a lot more > efficient than awk. Thanks for pointing this out. I'm still new to hacking at b.p.m and was looking for a way to do just that. I kept trying to put the conditional inside the for loop, which wasn't working. Thanks for the help, I appreciate it. -- WXS