From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Mar 15 23:10:00 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A0263382 for ; Fri, 15 Mar 2013 23:10:00 +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 8575C363 for ; Fri, 15 Mar 2013 23:10:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r2FNA0KX047221 for ; Fri, 15 Mar 2013 23:10:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r2FNA0qg047220; Fri, 15 Mar 2013 23:10:00 GMT (envelope-from gnats) Resent-Date: Fri, 15 Mar 2013 23:10:00 GMT Resent-Message-Id: <201303152310.r2FNA0qg047220@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, Craig Leres Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 893412E9 for ; Fri, 15 Mar 2013 23:00:55 +0000 (UTC) (envelope-from leres@ee.lbl.gov) Received: from fun.ee.lbl.gov (fun.ee.lbl.gov [IPv6:2620:83:8000:102::ca]) by mx1.freebsd.org (Postfix) with ESMTP id 7997A31E for ; Fri, 15 Mar 2013 23:00:55 +0000 (UTC) Received: from fun.ee.lbl.gov (localhost [127.0.0.1]) by fun.ee.lbl.gov (8.14.6/8.14.6) with ESMTP id r2FN0s5N008862 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 15 Mar 2013 16:00:54 -0700 (PDT) Received: (from leres@localhost) by fun.ee.lbl.gov (8.14.6/8.14.6/Submit) id r2FN0soI008861; Fri, 15 Mar 2013 16:00:54 -0700 (PDT) Message-Id: <201303152300.r2FN0soI008861@fun.ee.lbl.gov> Date: Fri, 15 Mar 2013 16:00:54 -0700 (PDT) From: Craig Leres To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: ports/177006: [PATCH] lang/perl5.12, lang/perl5.14, lang/perl5.16: Don't write to make.conf unless necessary Cc: leres@ee.lbl.gov X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Craig Leres List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2013 23:10:00 -0000 >Number: 177006 >Category: ports >Synopsis: [PATCH] lang/perl5.12, lang/perl5.14, lang/perl5.16: Don't write to make.conf unless necessary >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: Fri Mar 15 23:10:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Craig Leres >Release: FreeBSD 9.1-RELEASE amd64 >Organization: Lawrence Berkeley National Laboratory >Environment: System: FreeBSD fun.ee.lbl.gov 9.1-RELEASE FreeBSD 9.1-RELEASE #4 r13: Fri Feb 1 19:03:16 PST 2013 leres@fun.ee.lbl.gov:/sys/amd64/compile/LBL amd64 >Description: Reinstalling perl results in a USE_PERL line being appended to /etc/make.conf even when the identical definition is already present and in effect. >How-To-Repeat: deinstall/install perl and notice make.conf has been changed: # co -p /etc/make.conf | diff -u - /etc/make.conf /etc/RCS/make.conf,v --> standard output revision 1.48 --- - 2013-03-15 15:54:26.831481426 -0700 +++ /etc/make.conf 2013-03-15 15:54:14.000000000 -0700 @@ -79,3 +79,5 @@ PYTHON_VERSION=python2.7 PERL_VERSION=5.16.2 WITH_BDB_VER=48 +# added by use.perl 2013-03-15 15:54:14 +PERL_VERSION=5.16.2 >Fix: Only update when necessary; apply the attached patch to files/use.perl in lang/perl5.12, lang/perl5.14 and lang/perl5.16. --- patch.txt begins here --- --- files/use.perl.orig 2013-03-15 15:43:51.000000000 -0700 +++ files/use.perl 2013-03-15 15:44:40.000000000 -0700 @@ -131,10 +131,19 @@ do_spam_make_conf() { - echo -n "Spamming ${MAKE_CONF}..." - echo "$banner" >>${MAKE_CONF} - echo "PERL_VERSION=%%PERL_VERSION%%" >>${MAKE_CONF} - echo " Done." + # Only update when necessary + echo -n "Checking ${MAKE_CONF}..." + curver="`egrep '^PERL_VERSION=' ${MAKE_CONF} | tail -1`" + newver="PERL_VERSION=%%PERL_VERSION%%" + if [ "${curver}" == "${newver}" ]; then + echo " Ok." + else + echo " Needs updating." + echo -n "Spamming ${MAKE_CONF}..." + echo "$banner" >>${MAKE_CONF} + echo "${newver}" >>${MAKE_CONF} + echo " Done." + fi } do_spam_manpath() --- patch.txt ends here --- >Release-Note: >Audit-Trail: >Unformatted: