From owner-svn-ports-all@FreeBSD.ORG Mon Nov 4 14:02:04 2013 Return-Path: Delivered-To: svn-ports-all@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 06F5B3BA; Mon, 4 Nov 2013 14:02:04 +0000 (UTC) (envelope-from feld@FreeBSD.org) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B2F83272C; Mon, 4 Nov 2013 14:02:03 +0000 (UTC) Received: from compute5.internal (compute5.nyi.mail.srv.osa [10.202.2.45]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 2BCCD2140D; Mon, 4 Nov 2013 09:01:55 -0500 (EST) Received: from web3 ([10.202.2.213]) by compute5.internal (MEProxy); Mon, 04 Nov 2013 09:01:55 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:from:to:cc:mime-version :content-transfer-encoding:content-type:subject:date:in-reply-to :references; s=smtpout; bh=fQq9X7wbcrTm/EAgM9Md86P2ywA=; b=uhrQ6 CTVKUzKtbqfDjakey+McstOHX29/Ejqt7tWJdaJbiXumuY22rrKJfvnLw0zl3Ng6 fUDkgssRNOdOCa8GwxG6lLSjSyrPQd93rYqHKW5Ay+HZFvR1UUDcN5vxEQAAFGKm x83l62j4fpyREIij+tulZ5CmCtheWXXrfKsZOU= Received: by web3.nyi.mail.srv.osa (Postfix, from userid 99) id 0293F10B296; Mon, 4 Nov 2013 09:01:54 -0500 (EST) Message-Id: <1383573714.10238.42701297.24E02675@webmail.messagingengine.com> X-Sasl-Enc: vZ70BtfVkN8rdoPtc/UT+rqVxkHNtBeh6/DU0o4oaCoi 1383573714 From: Mark Felder To: Tijl Coosemans MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-d4893488 Subject: Re: svn commit: r332560 - head/astro/ephem Date: Mon, 04 Nov 2013 08:01:54 -0600 In-Reply-To: <20131103193139.5e44b9b8@kalimero.tijl.coosemans.org> References: <201311022337.rA2NbENO095280@svn.freebsd.org> <20131103193139.5e44b9b8@kalimero.tijl.coosemans.org> Cc: svn-ports-head@freebsd.org, svn-ports-all@freebsd.org, ports-committers@freebsd.org X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 14:02:04 -0000 On Sun, Nov 3, 2013, at 12:31, Tijl Coosemans wrote: > 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 > Yes, I was planning something like that but didn't have time to fully test it. I also would prefer the maintainer's feedback as I don't use this software. However, the fact that we still have to do this is quite inefficient not to mention inconsistent throughout the tree. I'm hoping someone can add functionality to the ports tree that handles installation of example/sample configs and automatically removes them during deinstall if they haven't been modified. > Also, I think you can remove the USE_GCC=any if you add -Wno-return-type > to CFLAGS. I will test building with that added to CFLAGS and ask the maintainer to confirm that the software works correctly. And thank you very much for the suggestion -- I'm not a programmer by trade and learning what errors could be solved by which CFLAGS is an ongoing process. I'll take note of this and put it in my toolbox. :-)