From owner-freebsd-ports@FreeBSD.ORG Sat Aug 4 00:50:00 2012 Return-Path: Delivered-To: ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 961AD1065670 for ; Sat, 4 Aug 2012 00:50:00 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 062F48FC0A for ; Sat, 4 Aug 2012 00:49:59 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q740nwlk096387 for ; Sat, 4 Aug 2012 00:49:58 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q740nw13096385 for ports@FreeBSD.org; Sat, 4 Aug 2012 00:49:58 GMT (envelope-from bdrewery) Received: (qmail 91804 invoked from network); 3 Aug 2012 19:49:56 -0500 Received: from unknown (HELO ?10.10.0.115?) (freebsd@shatow.net@10.10.0.115) by sweb.xzibition.com with ESMTPA; 3 Aug 2012 19:49:56 -0500 Message-ID: <501C71A8.4080505@FreeBSD.org> Date: Fri, 03 Aug 2012 19:49:44 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: ports@FreeBSD.org X-Enigmail-Version: 1.4.3 OpenPGP: id=3C9B0CF9; url=http://www.shatow.net/bryan/bryan.asc Content-Type: multipart/mixed; boundary="------------020809080104040807080100" Cc: Baptiste Daroussin Subject: [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: Sat, 04 Aug 2012 00:50:00 -0000 This is a multi-part message in MIME format. --------------020809080104040807080100 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 -- Regards, Bryan Drewery bdrewery@freenode/EFNet --------------020809080104040807080100 Content-Type: text/plain; charset=windows-1252; name="patch-bsd.port.mk.options.txt" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="patch-bsd.port.mk.options.txt" LS0tIC91c3IvcG9ydHMvTWsvYnNkLnBvcnQubWsub3JpZwkyMDEyLTA4LTA0IDAyOjIyOjI5 LjAwMDAwMDAwMCArMDIwMAorKysgL3Vzci9wb3J0cy9Nay9ic2QucG9ydC5tawkyMDEyLTA4 LTA0IDAyOjMyOjIwLjAwMDAwMDAwMCArMDIwMApAQCAtNTY5Miw2ICs1NjkyLDcgQEAKIC5l bmRpZgogLmVuZGlmCiAuZW5kaWYKKwlAY2QgJHsuQ1VSRElSfSAmJiB7ICR7RUNIT19DTUR9 IC1uICJAY29tbWVudCBPUFRJT05TOiI7ICR7TUFLRX0gcHJldHR5LXByaW50LWNvbmZpZzsg fSA+PiAke1RNUFBMSVNUfQogLmVuZGlmCiAKICR7VE1QUExJU1R9Ogo= --------------020809080104040807080100--