From owner-freebsd-ports@FreeBSD.ORG Tue Dec 5 17:27:20 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 E1EBB16A403; Tue, 5 Dec 2006 17:27:20 +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 262F843CBA; Tue, 5 Dec 2006 17:26:40 +0000 (GMT) (envelope-from wxs@atarininja.org) Received: by syn.atarininja.org (Postfix, from userid 1001) id D5FB15C57; Tue, 5 Dec 2006 12:28:03 -0500 (EST) Date: Tue, 5 Dec 2006 12:28:03 -0500 From: Wesley Shields To: Scot Hetzel Message-ID: <20061205172803.GA51892@atarininja.org> References: <17771.24717.95357.989644@jerusalem.litteratus.org> <456B70E9.4030408@FreeBSD.org> <20061204213106.GA42084@atarininja.org> <45749998.3070308@FreeBSD.org> <20061204232125.GA42307@atarininja.org> <790a9fff0612050838s66c655fapfde80d4038f64ca2@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <790a9fff0612050838s66c655fapfde80d4038f64ca2@mail.gmail.com> User-Agent: Mutt/1.5.13 (2006-08-11) Cc: ports@freebsd.org, Doug Barton 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 17:27:21 -0000 On Tue, Dec 05, 2006 at 10:38:42AM -0600, Scot Hetzel wrote: > The bsd.port.mk patch could be changed to: > > .if (${OSVERSION} > 602100 && ${OSVERSION} < 700000) || ${OSVERSION} > > 700027 > PKGDISTFILE= "comment distfile" > .else > PKGDISTFILE="distfile" > .endif > : > : > - ${ECHO_CMD} "@distfle $${file}" >> ${TMPPLIST}; \ > + ${ECHO_CMD} "@${PKGDISTFILE} $${file}" >> ${TMPPLIST}; \ > > This would allow the bsd.port.mk patch be added, without having to > update the pkg_install tools on older systems. > > Then the ports tools (portupgrade, portmaster, ..) could be changed to > look for either "@distfile" or "@comment distfile" in the +CONTENTS > file. I was going to suggest wrapping the patch in an OSVERSION check for the proper pkg_info update, however I think your approach is better. There are some cosmetic changes to be made, and a discussion I would like to have before I take this any further... Cosmetic change: With the patch applied using the -F flag on a package which does not have the distfile information recorded looks like this: wxs@ack ~ > pkg_info -F qemu-0.8.2s.20061128 Information for qemu-0.8.2s.20061128: Distfile(s): wxs@ack ~ > I'm going to make it ignore the -F flag when there are no recorded distfiles (and document this fact in the manpage). As for the discussion: I did find an old thread[1] which discusses this. The point was raised that +CONTENTS is probably not the perfect place for this, to which I agree. But putting it in +DISTINFO will require more complexity than embedding it in +CONTENTS. The argument could be made that recording the distfiles which were used to make the contents justifies the existence of their names in +CONTENTS (as a @comment). I'm willing to move them to +DISTINFO instead if people feel strongly enough about them NOT being in +CONTENTS. For now, I'm operating on the premise that +CONTENTS is the place for them (though not optimal) and in a form which will not require changes to pkg_create to handle. > I also noticed that the patch to the pkg_info man page is using a > lower case f, instead of an upper case F for the option to show the > distfiles of a given package. Thanks, I missed that. I'll post updated patches when they are complete. -- WXS [1]: http://lists.freebsd.org/mailman/htdig/freebsd-ports/2006-January/028839.html