[121399] trunk/dports/security

petr at macports.org petr at macports.org
Mon Jul 7 02:35:12 PDT 2014

On 25 Jun 2014, at 00:55, Ryan Schmidt <ryandesign at macports.org> wrote:

> On Jun 24, 2014, at 5:53 PM, Peter Danecek <peter.danecek at ingv.it> wrote:
>> On 25 Jun 2014, at 00:34, Ryan Schmidt <ryandesign at macports.org> wrote:
>>> On Jun 24, 2014, at 4:12 PM, petr at macports.org wrote:
>>>> +post-deactivate {
>>>> +    ui_msg "Purging CRLs ..."
>>>> +    system "${prefix}/sbin/clean-crl -v -l ${certdir}"
>>>> +
>>>> +    # cleanup leftover directories
>>>> +    catch {file delete ${certdir}}
>>>> +    catch {file delete ${prefix}/etc/grid-security}
>>>> +}
>>> You can just use "delete X" instead of "catch {file delete X}".
>> Okay, but would this change merit a revision bump? I understand that the post-(de)activate scripts are registered with the installed port, or am I wrong?
> They are, but since this change would just be for stylistic reasons and wouldn't change the functionality, I wouldn't increase the revision.

Hi Ryan,
Hi all,

I would like to follow up on this. I did the proposed change some time ago, but now have some doubt if this is really functionally identical.

I indent to clean up the directory ONLY if it is already empty. The solution using "catch" was proposed earlier on the list. Isn't it that if that, if there are files in the directory file, `delete ${certdir}`, would fail but the error is catched and no action is performed. On the contrary the `delete` alias translates to `file delete -force` to remove the directory in any case?


More information about the macports-dev mailing list