Ok, sounds good to me.
Brock
Tom Mueller wrote:
The idea on lines 161 and 132 is to preserve the size information in
the cache rather than to through it away. The change on line 180 sets
the mode to binary so that on Windows, extra CR characters are not
added to the file. The extra CRs are what was throwing the size
calculation off.
The warning about tell() is for files that being read with fgets. We
don't do that with these log files.
A seek before the tell is not necessary because the file is opened in
append mode.
Thank you for reviewing this so quickly.
Tom
[email protected] wrote:
Updatelog.py
Line 161 and 180: I don't understand the changes being made here.
I didn't understand this at first either, and thought it was wrong.
After some digging, I think this ought to work. However, the Python
2.4.4 documentation has dire warning about using tell() on win32
platforms. Apparently, the interaction with fgets() is poor.
I also thought it was a bit weird that we didn't seek to the end of the
fd before calling tell(). I know we're implicitly at the end of the
file since we're appending, but that concern jumped out regardless.
-j
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss