From owner-freebsd-ports@FreeBSD.ORG Mon Dec 4 23:20:47 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 4842116A4CE; Mon, 4 Dec 2006 23:20:47 +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 875CC43CA2; Mon, 4 Dec 2006 23:20:11 +0000 (GMT) (envelope-from wxs@atarininja.org) Received: by syn.atarininja.org (Postfix, from userid 1001) id 27C8C5C57; Mon, 4 Dec 2006 18:21:25 -0500 (EST) Date: Mon, 4 Dec 2006 18:21:25 -0500 From: Wesley Shields To: Doug Barton Message-ID: <20061204232125.GA42307@atarininja.org> References: <17771.24717.95357.989644@jerusalem.litteratus.org> <456B70E9.4030408@FreeBSD.org> <20061204213106.GA42084@atarininja.org> <45749998.3070308@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <45749998.3070308@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: Mon, 04 Dec 2006 23:20:47 -0000 On Mon, Dec 04, 2006 at 01:56:40PM -0800, Doug Barton wrote: > Wesley Shields wrote: > > On Mon, Nov 27, 2006 at 03:12:41PM -0800, Doug Barton wrote: > >> Robert Huff wrote: > >>> Let's suppose I have a list of tarballs > >>> (e.g. foobar-1.23.456.tar.gz). How do I tell which port each file > >>> belongs to? "pkg_info" only lists the end results. > >> The correct answer is, "not easily." You can look at the code for > >> sysutils/portmaster to get an idea of how you could do it, but what > >> really needs to happen is for someone to write the code to embed that > >> data in the +CONTENTS file. > > > > I took a stab at this over the weekend. It's broken up into two parts. > > [1] is the addition to pkg_create and pkg_info and [2] is the addiction > > to bsd.port.mk. > > > > I mentioned this to pav@ on IRC a few days ago and I believe he and I > > may have miscommunicated regarding the use of this patch. With that > > said, I figured I would toss this out to the list as a possible way of > > recording the distfile(s) and patchfile(s) associated with a given > > port/package. > > > > The end result is a series of @distfile foo/bar.tar.gz lines in > > +CONTENTS. You can then use pkg_info -F to get a listing of them. > > > > It's my first time doing something like this so please be gentle. :) > > > > -- WXS > > > > [1]: http://www.atarininja.org/~wxs/patches/distfile-in-contents-part1.diff > > [2]: http://www.atarininja.org/~wxs/patches/distfile-in-contents-part2.diff > > After a cursory exam this looks really great! I'd love to see this, or > something like it added ASAP. At minimum the bsd.port.mk patch should > definitely be added even if it takes a while for the other stuff to > percolate. > > Doug I'm fairly certain that the bsd.port.mk patch requires the other one (pkg_create will fall over when it encounters the @distfile lines). I'd be happy to send-pr it if nobody objects in a day or two. -- WXS