From owner-freebsd-ports@FreeBSD.ORG Fri Jan 14 21:34:28 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 1638216A4CE for ; Fri, 14 Jan 2005 21:34:28 +0000 (GMT) Received: from voodoo.oberon.net (voodoo.oberon.net [212.118.165.100]) by mx1.FreeBSD.org (Postfix) with ESMTP id C067C43D31 for ; Fri, 14 Jan 2005 21:34:27 +0000 (GMT) (envelope-from krion@voodoo.oberon.net) Received: from krion by voodoo.oberon.net with local (Exim 4.43 (FreeBSD)) id 1CpZ53-0002z6-UG; Fri, 14 Jan 2005 22:34:05 +0100 Date: Fri, 14 Jan 2005 22:34:05 +0100 From: Kirill Ponomarew To: Edwin Groothuis Message-ID: <20050114213405.GA10065@voodoo.oberon.net> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050114211206.GF1175@k7.mavetju> X-NCC-Regid: de.oberon X-NIC-HDL: KP869-RIPE cc: freebsd-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:34:28 -0000 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. -Kirill