From owner-freebsd-ports@FreeBSD.ORG Mon Aug 6 08:00:21 2012 Return-Path: Delivered-To: ports@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by hub.freebsd.org (Postfix) with ESMTP id 0F5FF106566B; Mon, 6 Aug 2012 08:00:20 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from opti.dougb.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id D2DFF14DAFD; Mon, 6 Aug 2012 08:00:20 +0000 (UTC) Message-ID: <501F7994.305@FreeBSD.org> Date: Mon, 06 Aug 2012 01:00:20 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:14.0) Gecko/20120728 Thunderbird/14.0 MIME-Version: 1.0 To: Bryan Drewery References: <501C71A8.4080505@FreeBSD.org> In-Reply-To: <501C71A8.4080505@FreeBSD.org> X-Enigmail-Version: 1.4.2 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: ports@FreeBSD.org, Baptiste Daroussin Subject: Re: [RFC] bsd.port.mk: Record OPTIONS into /var/db/pkg on install 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, 06 Aug 2012 08:00:21 -0000 On 08/03/2012 17:49, Bryan Drewery wrote: > Hi, > > While developing on ports-mgmt/poudriere I've added support to > automatically rebuild packages if the selected options in /var/db/ports, > or make.conf change. This so far has worked well with pkgng as it > records the OPTIONS selected into the package already. > > By suggestion of bapt, 'pretty-print-config' is used to compare the > packaged OPTIONS to the selected OPTIONS. This has worked great for pkgng. > > Just today I added support [1] to poudriere for pkg_create(1) packages > by storing the 'pretty-print-config' into the > /var/db/pkg/PKGNAME/+CONTENTS as a comment: > > @comment OPTIONS:`make pretty-print-config` > > I'd like to add it to 'fake-pkg' so that the @comment is saved on every > port/package creation. > > This may potentially benefit portmaster and portupgrade as well. > > [1] http://fossil.etoilebsd.net/poudriere/ci/98426527c8?sbs=0 > > Comparison of the package +CONTENTS after patch: > > diff -ur /tmp/zsh-5.0.0.orig/+CONTENTS /var/db/pkg/zsh-5.0.0/+CONTENTS > --- /tmp/zsh-5.0.0.orig/+CONTENTS 2012-08-04 02:31:51.000000000 +0200 > +++ /var/db/pkg/zsh-5.0.0/+CONTENTS 2012-08-04 02:33:26.000000000 +0200 > @@ -639,7 +639,7 @@ > share/zsh/5.0.0/functions/Completion/Solaris/_zones > @comment MD5:858863d60ce982e149dbe3f2adb679c3 > share/zsh/5.0.0/functions/Completion/Unix.zwc > -@comment MD5:13a3ee08695e76219a326f722d7006c7 > +@comment MD5:8219096a131f65761e23864a62088298 > share/zsh/5.0.0/functions/Completion/Unix/_a2ps > @comment MD5:e2d2d6b9f68fd43ce63040fc680ef9d6 > share/zsh/5.0.0/functions/Completion/Unix/_adb > @@ -2013,6 +2013,7 @@ > @dirrm share/zsh/5.0.0/scripts > @dirrm share/zsh/5.0.0 > @unexec rmdir "%D/share/zsh" 2>/dev/null || true > +@comment OPTIONS:-DEBUG +DOCS -GDBM +MAILDIR -MEM +MULTIBYTE -PCRE > +SECURE_FREE -STATIC > @cwd > @dirrm share/licenses/zsh-5.0.0 > @unexec rmdir %D/share/licenses 2>/dev/null || true I think this is a fantastic idea, as it would more fully answer the question of "how was this package built?" I would also like to see us embed the distfile information, either in +CONTENTS or in its own file. This information is very useful for tools like portmaster to better handle automated distfile cleanup. hth, Doug -- I am only one, but I am one. I cannot do everything, but I can do something. And I will not let what I cannot do interfere with what I can do. -- Edward Everett Hale, (1822 - 1909)