From owner-svn-ports-head@FreeBSD.ORG Sun Nov 3 18:31:44 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D245B406; Sun, 3 Nov 2013 18:31:44 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay004.isp.belgacom.be (mailrelay004.isp.belgacom.be [195.238.6.170]) by mx1.freebsd.org (Postfix) with ESMTP id B184F2BE2; Sun, 3 Nov 2013 18:31:43 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlYGAMuVdlJR8nUw/2dsb2JhbABZgwc4R79agRoXdIIlAQEFOhweBRALDgYECSUPKh4GiBgBCL01jyUzB4QuA5gJgTCQWoMnOw Received: from 48.117-242-81.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([81.242.117.48]) by relay.skynet.be with ESMTP; 03 Nov 2013 19:31:40 +0100 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.7/8.14.7) with ESMTP id rA3IVdGv011729; Sun, 3 Nov 2013 19:31:39 +0100 (CET) (envelope-from tijl@FreeBSD.org) Date: Sun, 3 Nov 2013 19:31:39 +0100 From: Tijl Coosemans To: Mark Felder Subject: Re: svn commit: r332560 - head/astro/ephem Message-ID: <20131103193139.5e44b9b8@kalimero.tijl.coosemans.org> In-Reply-To: <201311022337.rA2NbENO095280@svn.freebsd.org> References: <201311022337.rA2NbENO095280@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-ports-head@freebsd.org, svn-ports-all@freebsd.org, ports-committers@freebsd.org X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Nov 2013 18:31:44 -0000 On Sat, 2 Nov 2013 23:37:14 +0000 (UTC) Mark Felder wrote: > Author: feld > Date: Sat Nov 2 23:37:13 2013 > New Revision: 332560 > URL: http://svnweb.freebsd.org/changeset/ports/332560 > > Log: > Reverting STAGE support. Just realized the way the .db and .cfg files > are being installed needs to be reworked for STAGE or we will always > overwrite them, breaking POLA > > Approved by: swills (mentor, implicit), my guilty conscience > > Modified: > head/astro/ephem/Makefile > > Modified: head/astro/ephem/Makefile > ============================================================================== > --- head/astro/ephem/Makefile Sat Nov 2 23:29:18 2013 (r332559) > +++ head/astro/ephem/Makefile Sat Nov 2 23:37:13 2013 (r332560) > @@ -21,11 +21,11 @@ USE_GCC= any > > do-install: > -cd ${WRKSRC}; \ > - ${INSTALL_PROGRAM} ephem ${STAGEDIR}${PREFIX}/bin; \ > - ${MKDIR} ${STAGEDIR}${PREFIX}/share/ephem; \ > - ${INSTALL_DATA} Man.txt ${STAGEDIR}${PREFIX}/share/ephem/; \ > - [ ! -f ${STAGEDIR}${PREFIX}/share/ephem/ephem.db ] && ${INSTALL_DATA} ephem.db ${STAGEDIR}${PREFIX}/share/ephem/; \ > - [ ! -f ${STAGEDIR}${PREFIX}/share/ephem/ephem.cfg ] && ${INSTALL_DATA} ephem.cfg ${STAGEDIR}${PREFIX}/share/ephem/ > + ${INSTALL_PROGRAM} ephem ${PREFIX}/bin; \ > + ${MKDIR} ${PREFIX}/share/ephem; \ > + ${INSTALL_DATA} Man.txt ${PREFIX}/share/ephem/; \ > + [ ! -f ${PREFIX}/share/ephem/ephem.db ] && ${INSTALL_DATA} ephem.db ${PREFIX}/share/ephem/; \ > + [ ! -f ${PREFIX}/share/ephem/ephem.cfg ] && ${INSTALL_DATA} ephem.cfg ${PREFIX}/share/ephem/ > > post-install: > @${ECHO_MSG} Don\'t forget to edit ${PREFIX}/share/ephem/ephem.cfg! Hmm, this post-install message suggests modifying an installed file which means when the package is deleted the file stays because of a checksum failure and that's why you need the existence test in do-install. The correct way to deal with this situation is to install those files as *.sample and then put the following in pkg-plist for each file: @unexec if cmp -s %D/%%DATADIR%%/ephem.cfg %D/%%DATADIR%%/ephem.cfg.sample; then rm -f %D/%%DATADIR%%/ephem.cfg; fi %%DATADIR%%/ephem.cfg.sample @exec if [ ! -f %B/ephem.cfg ]; then cp -p %D/%F %B/ephem.cfg; fi Also, I think you can remove the USE_GCC=any if you add -Wno-return-type to CFLAGS.