From owner-freebsd-ports@FreeBSD.ORG Fri Jan 14 21:48:09 2005 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A2FB216A4CE for ; Fri, 14 Jan 2005 21:48:09 +0000 (GMT) Received: from mail2out.barnet.com.au (mail2out.barnet.com.au [202.83.176.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B82D43D45 for ; Fri, 14 Jan 2005 21:48:09 +0000 (GMT) (envelope-from edwin@mavetju.org) Received: by mail2out.barnet.com.au (Postfix, from userid 27) id 4EC6D707446; Sat, 15 Jan 2005 08:48:08 +1100 (EST) X-Viruscan-Id: <41E83E1800001EBE5B5D16@BarNet> Received: from mail2-auth.barnet.com.au (mail2.barnet.com.au [202.83.176.13]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) Authority" (verified OK)) by mail2.barnet.com.au (Postfix) with ESMTP id 0D2AB707445; Sat, 15 Jan 2005 08:48:08 +1100 (EST) Received: from k7.mavetju (edwin-3.int.barnet.com.au [10.10.12.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) Certificate Authority" (verified OK)) by mail2-auth.barnet.com.au (Postfix) with ESMTP id 73160707444; Sat, 15 Jan 2005 08:48:07 +1100 (EST) Received: by k7.mavetju (Postfix, from userid 1001) id 7C7FB6109; Sat, 15 Jan 2005 08:48:06 +1100 (EST) Date: Sat, 15 Jan 2005 08:48:06 +1100 From: Edwin Groothuis To: Kirill Ponomarew Message-ID: <20050114214806.GG1175@k7.mavetju> References: <20050113062739.GA28658@xor.obsecurity.org> <20050113180504.GA26064@xor.obsecurity.org> <20050114130404.250d6e26@apircalabu.dsd.ro> <20050114112918.GF69532@voodoo.oberon.net> <20050114211206.GF1175@k7.mavetju> <20050114213405.GA10065@voodoo.oberon.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050114213405.GA10065@voodoo.oberon.net> User-Agent: Mutt/1.5.6i cc: ports@freebsd.org Subject: Re: HEADS UP: pkg-plist strict enforcement starting X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jan 2005 21:48:09 -0000 On Fri, Jan 14, 2005 at 10:34:05PM +0100, Kirill Ponomarew wrote: > On Sat, Jan 15, 2005 at 08:12:06AM +1100, Edwin Groothuis wrote: > > Maybe we need two additional @ commands for pkg-plist: > > > > - @dirrmifempty foo/bar > > does do what "@unexec rmdir %D/foo/bar 2>/dev/null || true" does. > > > > - @rmifdifferent foo/bar foo/baz > > does do what "@unexec cmp %D/foo/bar %D/foo/baz && rm %D/foo/bar" does. > > > > This way we > > > > - have an easy and consistent syntax for a difficult command > > > > - have less chance for errors (forgetting %D, && instead of ||) > > > > Comments? > > Sounds interesting, but I'd change @rmifdifferent to something like > @rmconfig since it's used by config files in most cases. Question of course is, how do we upgrade pkg_delete. Looks like it is part of sysutils/pkg_install. I'm going to think about it this weekend and hopefully more people will give their comments on it. Edwin -- Edwin Groothuis | Personal website: http://www.mavetju.org edwin@mavetju.org | Weblog: http://weblog.barnet.com.au/edwin/