[1805] in BarnOwl Developers
Re: Review of kcr/zsig branch.
daemon@ATHENA.MIT.EDU (Karl Ramm)
Thu Oct 29 18:22:25 2009
Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
X-Original-To: nelhage@lunatique.mit.edu
From: Karl Ramm <kcr@1ts.org>
To: Anders Kaseorg <andersk@mit.edu>
Cc: barnowl-dev@mit.edu
Date: Sun, 18 Oct 2009 14:01:41 -0400
In-Reply-To: <uuseip0d3oi.fsf@bucket.permabit.com> (Karl Ramm's message of
"Sun, 18 Oct 2009 13:15:09 -0400")
After a discussion on zephyr about the semantics of the disappearance of
the .zsigs file, I give up.
kcr
Karl Ramm <kcr@1ts.org> writes:
> Anders Kaseorg <andersk@MIT.EDU> writes:
>
>> - if (!defined($zsigs)) {
>> + if (!defined($zsigs) || _zsigs_need_reloaded()) {
>>
>> This is a bit sloppy: _zsigs_need_reloaded is not called from the very=20
>> first random_zephyr_signature call, so $loaded_mtime does not get=20
>> initialized until the second call, and the reload will not be avoided=20
>> until the third call.
>>
>> If you had a ~/.zsigs file but then you delete it, _zsigs_need_reloaded=
=20
>> will return 0 and it will keep using the deleted .zsigs.
>
> Yes. That seems like the desirable behavior to me.
>
>> I think it doesn=E2=80=99t make sense for _zsigs_need_reloaded to be a s=
eparate=20
>> function from reload_zephyr_signatures. If you were to call=20
>> _zsigs_need_reloaded without calling reload_zephyr_signatures, the state=
=20
>> would be reset to =E2=80=9Creload not needed=E2=80=9D anyway.
>
> You have a point. When I wrote that code, it seemed both reasonable to al=
ter
> things as little as possible, and like the logic would get awkward otherw=
ise.
>
>>
>> open(ZSIGS, $random_zsig_file) should be open(ZSIGS, '<',=20
>> $random_zsig_file).
>>
>> return $old_mtime !=3D $loaded_mtime; is indented too far.
>>
>> Anders
>
> I just pushed a rethink/rewrite to the branch, that addresses your
> suggestions but will trigger more...
>
> kcr