From owner-freebsd-ports@FreeBSD.ORG Mon Jun 28 23:13:50 2010 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A696106566B for ; Mon, 28 Jun 2010 23:13:50 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from server.mypc.hu (server.mypc.hu [87.229.73.95]) by mx1.freebsd.org (Postfix) with ESMTP id 53BCA8FC0C for ; Mon, 28 Jun 2010 23:13:50 +0000 (UTC) Received: from server.mypc.hu (localhost [127.0.0.1]) by server.mypc.hu (Postfix) with ESMTP id 2FC6914DBE00; Tue, 29 Jun 2010 01:13:48 +0200 (CEST) X-Virus-Scanned: amavisd-new at server.mypc.hu Received: from server.mypc.hu ([127.0.0.1]) by server.mypc.hu (server.mypc.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 1EkPBXV9HTcN; Tue, 29 Jun 2010 01:13:45 +0200 (CEST) Received: from [192.168.1.105] (catv-80-99-92-167.catv.broadband.hu [80.99.92.167]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by server.mypc.hu (Postfix) with ESMTPSA id 5B53514DBDB5; Tue, 29 Jun 2010 01:13:45 +0200 (CEST) Message-ID: <4C292CA7.2080402@FreeBSD.org> Date: Tue, 29 Jun 2010 01:13:43 +0200 From: Gabor Kovesdan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-PT; rv:1.9.1.10) Gecko/20100512 Thunderbird/3.0.5 MIME-Version: 1.0 To: Paul Schmehl References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Ports Subject: Re: This construction doesn't work 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: Mon, 28 Jun 2010 23:13:50 -0000 Em 2010.06.29. 0:24, Paul Schmehl escreveu: > I'm working on a port update for one of the ports that I maintain, and > I've run into a problem that I can't seem to solve. > > I use this construction to ensure that the port doesn't overwrite the > conf file, if one exists: > > .for f in barnyard2.conf > ${INSTALL_DATA} ${WRKSRC}/etc/${f} ${PREFIX}/etc/${f}-sample > [ -f ${PREFIX}/etc/${f} ] || \ > ${INSTALL_DATA} ${WRKSRC}/etc/${f} ${PREFIX}/etc/${f} > .endfor > > But it gets overwritten anyway. What am I doing wrong? I thought > this worked before, but I can't be sure. Testing proves that it does > not work now. I tried to changing to an if [ ! -f construction, but > that didn't do a thing. > I think it should work, I used to write the same in audio/shoutcast. Are you testing by installing from port or from package? It should work for ports but for packages, you need some more magic in pkg-plist. You can also refer to audio/shoutcast how it is done there. Maybe is it what you missed? Regards, Gabor