Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Jan 2005 22:34:05 +0100
From:      Kirill Ponomarew <krion@voodoo.oberon.net>
To:        Edwin Groothuis <edwin@mavetju.org>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: HEADS UP: pkg-plist strict enforcement starting
Message-ID:  <20050114213405.GA10065@voodoo.oberon.net>
In-Reply-To: <20050114211206.GF1175@k7.mavetju>
References:  <20050113062739.GA28658@xor.obsecurity.org> <Pine.LNX.4.44.0501131148520.25402-100000@pancho> <20050113180504.GA26064@xor.obsecurity.org> <20050114130404.250d6e26@apircalabu.dsd.ro> <20050114112918.GF69532@voodoo.oberon.net> <20050114211206.GF1175@k7.mavetju>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050114213405.GA10065>