On 25 Jun 2014, at 00:55, Ryan Schmidt <[email protected]> wrote:

> 
> On Jun 24, 2014, at 5:53 PM, Peter Danecek <[email protected]> wrote:
> 
>> 
>> On 25 Jun 2014, at 00:34, Ryan Schmidt <[email protected]> wrote:
>> 
>>> 
>>> On Jun 24, 2014, at 4:12 PM, [email protected] 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?

Thanks!
~petr



_______________________________________________
macports-dev mailing list
[email protected]
https://lists.macosforge.org/mailman/listinfo/macports-dev

Reply via email to