Date: Fri, 16 Feb 2018 10:52:09 -0600 From: Mark Felder <feld@FreeBSD.org> To: Tijl Coosemans <tijl@FreeBSD.org> Cc: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: Re: svn commit: r461746 - head/security/ca_root_nss Message-ID: <1518799929.3798113.1273296336.4F94C55E@webmail.messagingengine.com> In-Reply-To: <20180216174106.125d61af@kalimero.tijl.coosemans.org> References: <201802132045.w1DKjdOQ093642@repo.freebsd.org> <20180214141840.583d247a@kalimero.tijl.coosemans.org> <1518795735.3761657.1273209560.03AB7B50@webmail.messagingengine.com> <20180216174106.125d61af@kalimero.tijl.coosemans.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Feb 16, 2018, at 10:41, Tijl Coosemans wrote: > On Fri, 16 Feb 2018 09:42:15 -0600 Mark Felder <feld@FreeBSD.org> wrote: > > On Wed, Feb 14, 2018, at 07:18, Tijl Coosemans wrote: > >> On Tue, 13 Feb 2018 20:45:39 +0000 (UTC) Mark Felder <feld@FreeBSD.org> wrote: > >>> Modified: head/security/ca_root_nss/pkg-plist > >>> ============================================================================== > >>> --- head/security/ca_root_nss/pkg-plist Tue Feb 13 20:25:50 2018 (r461745) > >>> +++ head/security/ca_root_nss/pkg-plist Tue Feb 13 20:45:38 2018 (r461746) > >>> @@ -3,3 +3,4 @@ > >>> @sample openssl/cert.pem.sample > >>> %%ETCSYMLINK%%/etc/ssl/cert.pem > >>> %%ETCSYMLINK%%@dir /etc/ssl > >>> +@postexec [ -x %%LOCALBASE%%/bin/cert-sync ] && %%LOCALBASE%%/bin/cert-sync --quiet %%PREFIX%%/share/certs/ca-root-nss.crt > >> > >> This command returns an error if the executable doesn't exist. You > >> should invert the logic: > >> > >> @postexec [ ! -x %%LOCALBASE%%/bin/cert-sync ] || %%LOCALBASE%%/bin/ > >> cert-sync --quiet %%PREFIX%%/share/certs/ca-root-nss.crt > > > > What did the error look like? I wasn't seeing anything in my testport > > runs. I intentionally reversed the logic from the original submitter for > > readability and now feel like a fool. :-) > > Installing ca_root_nss-3.35_1... > pkg-static: POST-INSTALL script failed > > Logically, "condition && command" is a conjunction (returns true if both > sides are true) while "!condition || command" is an implication like "if > condition then command". If-then may be more readable though. > > I changed -x to -e because I think it's informative to report an error if > the command exists but isn't executable. > Thanks. Feedback appreciated. -- Mark Felder ports-secteam & portmgr member feld@FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1518799929.3798113.1273296336.4F94C55E>