From owner-freebsd-ports-bugs@FreeBSD.ORG Sun May 19 01:30:03 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 33575E29 for ; Sun, 19 May 2013 01:30:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 197CACF6 for ; Sun, 19 May 2013 01:30:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r4J1U2Aq063928 for ; Sun, 19 May 2013 01:30:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r4J1U24D063927; Sun, 19 May 2013 01:30:02 GMT (envelope-from gnats) Resent-Date: Sun, 19 May 2013 01:30:02 GMT Resent-Message-Id: <201305190130.r4J1U24D063927@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "John W. O'Brien" Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 38665E13 for ; Sun, 19 May 2013 01:27:25 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.FreeBSD.org (oldred.freebsd.org [8.8.178.121]) by mx1.freebsd.org (Postfix) with ESMTP id B4E4CCEC for ; Sun, 19 May 2013 01:27:24 +0000 (UTC) Received: from oldred.FreeBSD.org ([127.0.1.6]) by oldred.FreeBSD.org (8.14.5/8.14.5) with ESMTP id r4J1RNKO029053 for ; Sun, 19 May 2013 01:27:23 GMT (envelope-from nobody@oldred.FreeBSD.org) Received: (from nobody@localhost) by oldred.FreeBSD.org (8.14.5/8.14.5/Submit) id r4J1RN0w029052; Sun, 19 May 2013 01:27:23 GMT (envelope-from nobody) Message-Id: <201305190127.r4J1RN0w029052@oldred.FreeBSD.org> Date: Sun, 19 May 2013 01:27:23 GMT From: "John W. O'Brien" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/178762: [patch] Mk/bsd.port.mk: Store options alphabetically X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 May 2013 01:30:03 -0000 >Number: 178762 >Category: ports >Synopsis: [patch] Mk/bsd.port.mk: Store options alphabetically >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun May 19 01:30:02 UTC 2013 >Closed-Date: >Last-Modified: >Originator: John W. O'Brien >Release: 9.1-STABLE >Organization: Saltant Solutions >Environment: FreeBSD XXXX.saltant.net 9.1-STABLE FreeBSD 9.1-STABLE #0 r248078: Fri Mar 8 20:36:00 EST 2013 root@XXXX.saltant.net:/usr/obj/usr/src/sys/NIPPL amd64 >Description: I keep /var/db/ports (or at least the options file therein) under revision control. After any update to ports when I am prompted to select or update options, I rsync the stored options into the repo and commit any changes along with reminders to my future self if I went with the maintainer's defaults or not, and sometimes why. The problem is that the order in which options are written to OPTIONSFILE is dependent on things that don't matter to the configuration management task, like (I guess) the order in which the maintainer wants options to appear in the config dialog. This often introduces superfluous diffs, which I would like to prevent. >How-To-Repeat: Go look at /var/db/ports/*/options right now. Are the lines in alphabetical order by option? It depends. net/wireshark, x11/xorg-apps, ftp/wget, and devel/gvfs are likely candidates. >Fix: The attached patch teaches bsd.port.mk to use the ":O" variable expansion modifier when writing TMPOPTIONSFILE. Patch attached with submission follows: Index: Mk/bsd.port.mk =================================================================== --- Mk/bsd.port.mk (revision 318467) +++ Mk/bsd.port.mk (working copy) @@ -6129,8 +6129,8 @@ ${ECHO_CMD} "# This file is auto-generated by 'make config'." > $${TMPOPTIONSFILE}; \ ${ECHO_CMD} "# Options for ${PKGNAME}" >> $${TMPOPTIONSFILE}; \ ${ECHO_CMD} "_OPTIONS_READ=${PKGNAME}" >> $${TMPOPTIONSFILE}; \ - ${ECHO_CMD} "_FILE_COMPLETE_OPTIONS_LIST=${COMPLETE_OPTIONS_LIST}" >> $${TMPOPTIONSFILE}; \ - for i in ${COMPLETE_OPTIONS_LIST}; do \ + ${ECHO_CMD} "_FILE_COMPLETE_OPTIONS_LIST=${COMPLETE_OPTIONS_LIST:O}" >> $${TMPOPTIONSFILE}; \ + for i in ${COMPLETE_OPTIONS_LIST:O}; do \ if ${ECHO_CMD} $${SELOPTIONS} | ${GREP} -qw $${i}; then \ ${ECHO_CMD} "OPTIONS_FILE_SET+=$${i}" >> $${TMPOPTIONSFILE}; \ else \ >Release-Note: >Audit-Trail: >Unformatted: