From owner-svn-ports-all@freebsd.org Fri Aug 19 03:22:35 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5706CBBF5B5; Fri, 19 Aug 2016 03:22:35 +0000 (UTC) (envelope-from adamw@adamw.org) Received: from apnoea.adamw.org (apnoea.adamw.org [204.109.59.150]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "apnoea.adamw.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D46951568; Fri, 19 Aug 2016 03:22:34 +0000 (UTC) (envelope-from adamw@adamw.org) Received: by apnoea.adamw.org (OpenSMTPD) with ESMTPSA id f41dbc7b TLS version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO; Thu, 18 Aug 2016 21:22:32 -0600 (MDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: svn commit: r420435 - in head/sysutils: cfengine33 cfengine34 cfengine35 cfengine36 cfengine37 cfengine38 cfengine39 From: Adam Weinberger In-Reply-To: <201608190120.u7J1KIcF090022@slippy.cwsent.com> Date: Thu, 18 Aug 2016 21:22:30 -0600 Cc: Cy Schubert , ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <65B513A9-A5FA-402D-AD70-2960CE6C6C2C@adamw.org> References: <201608190120.u7J1KIcF090022@slippy.cwsent.com> To: Cy Schubert X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.22 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: Fri, 19 Aug 2016 03:22:35 -0000 > On 18 Aug, 2016, at 19:20, Cy Schubert = wrote: >=20 > In message , Adam=20 > Weinberger wr > ites: >>> On 18 Aug, 2016, at 18:37, Cy Schubert wrote: >>>=20 >>> Author: cy >>> Date: Fri Aug 19 00:37:47 2016 >>> New Revision: 420435 >>> URL: https://svnweb.freebsd.org/changeset/ports/420435 >>>=20 >>> Log: >>> Update @unexec with modern @postunexec. >>>=20 >>> Modified: head/sysutils/cfengine33/pkg-plist >>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= >> =3D=3D=3D >>> --- head/sysutils/cfengine33/pkg-plist Thu Aug 18 23:28:59 2016 >> (r420434) >>> +++ head/sysutils/cfengine33/pkg-plist Fri Aug 19 00:37:47 2016 >> (r420435) >>>=20 >>> -@unexec rmdir "/var/cfengine/inputs" >/dev/null 2>&1 || : >>> +@postunexec rmdir "/var/cfengine/inputs" >/dev/null 2>&1 || : >>=20 >> Why not just plain old >> @dir /var/cfengine/inputs >> @dir will happily ignore non-empty directories. >>=20 >> And combining with your next commit, you can just >> @dir(root,wheel,700) /var/cfengine/ppkeys >=20 > Does that not delete the directory upon package deletion? If = upgrading,=20 > you're left with no keys, no data. >=20 > I suppose though, this could work because the directories would have = data=20 > and would not be deleted, except for a nasty message to the user. = Either=20 > way, it's a hack. AFAIK, @dir should never remove anything except empty directories. The only difference I'm aware of between @dir and the previous = @postunexec is the >/dev/null, and the ability to set mode/ownership and = declare the dir at the same time. # Adam --=20 Adam Weinberger adamw@adamw.org http://www.adamw.org