From owner-freebsd-ports@FreeBSD.ORG Thu Apr 22 17:20:13 2010 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 BC29F106564A for ; Thu, 22 Apr 2010 17:20:13 +0000 (UTC) (envelope-from corky1951@comcast.net) Received: from qmta13.westchester.pa.mail.comcast.net (qmta13.westchester.pa.mail.comcast.net [76.96.59.243]) by mx1.freebsd.org (Postfix) with ESMTP id 59E8D8FC1C for ; Thu, 22 Apr 2010 17:20:13 +0000 (UTC) Received: from omta04.westchester.pa.mail.comcast.net ([76.96.62.35]) by qmta13.westchester.pa.mail.comcast.net with comcast id 8czK1e0060ldTLk5DhLD5V; Thu, 22 Apr 2010 17:20:13 +0000 Received: from comcast.net ([98.203.142.76]) by omta04.westchester.pa.mail.comcast.net with comcast id 8hLB1e0051f6R9u3QhLBMr; Thu, 22 Apr 2010 17:20:12 +0000 Received: by comcast.net (sSMTP sendmail emulation); Thu, 22 Apr 2010 10:20:09 -0700 Date: Thu, 22 Apr 2010 10:20:09 -0700 From: Charlie Kester To: freebsd-ports@freebsd.org Message-ID: <20100422172009.GA27597@comcast.net> Mail-Followup-To: freebsd-ports@freebsd.org References: <4BCFEA35.8070109@bsdforen.de> <20100422065709.GA33521@e.0x20.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: X-Mailer: Mutt 1.5.20 X-Composer: Vim 7.2 User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: Dynamic plists 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: Thu, 22 Apr 2010 17:20:13 -0000 On Thu 22 Apr 2010 at 08:48:55 PDT Rob Farmer wrote: >On Wed, Apr 21, 2010 at 11:57 PM, Lars Engels wrote: >> On Thu, Apr 22, 2010 at 08:18:29AM +0200, Dominic Fandrey wrote: >>> On 22/04/2010 01:45, Rob Farmer wrote: >>> > I maintain math/scilab and am preparing to update it. This port has a >>> > huge plist (slightly under 15000 lines), hundreds of which change >>> > depending on what options are selected. It is a bit of a pain to >>> > update. The porters handbook makes vague reference to dynamic plists - >>> > so I was wondering, would this be a good idea? And if so, what is the >>> > best way to make one? >>> >>> You normally base it on the output of >>> ${FIND} -s PATH -type f >>> ${FIND} -d PATH -type d | ${SED} 's,^,@dirrm ,' >>> >>> Of course there's normally more to it, but that's the basic principle. >>> >> >> Or use auto-plist: >> http://www.marcuscom.com:8080/cgi-bin/cvsweb.cgi/portstools/auto-plist/ >> > >Seems to have the same limitation of genplist - it doesn't address the >fact that the plist may change if OPTIONS change. I feel your pain. But tools like genplist and auto-plist might get you part of the way to your solution. To get the rest of the way, you might need to write a custom maintenance script. Just thinking out loud here, but it seems you'll need to something similar to what mergemaster does: - enable all the options and use 'genplist create' to get a new plist - diff the previous portversion's plist and the new genplist - emit any lines that haven't changed - for lines that differ only in the presence of a PLIST_SUB variable at the beginning of the old line, emit the old line - ignore any lines which exist only in the old plist - for lines that are new, prompt for a decision on what to do (leave as is or preface with one of a predetermined set of PLIST_SUB variables) This doesn't automate the whole process, but at least it reduces the manual inspection and intervention to the plist lines that really need it. This is only a first stab at the problem, so the steps I outlined probably need to be refined and debugged. Or maybe I'm just being stupid. Wouldn't be the first time. :)