Hey,

On Tue, 2008-09-16 at 23:14:04 +0300, Guillem Jover wrote:
> So I think there's two things to fix here, one is that the fseek() in
> createimptmp() should be done just before the fwrite() in
> modstatdb_note_core() to guarantee that we are going to be always at the
> beginning, and we make proper use of the reserved space allocated
> previously with those '#padding' lines to avoid the out of space
> condition. That's a 4-liner patch, which should be fine for lenny, and
> prevents this bogus condition were the user most probably is going to
> remove that file to be able to continue, which might produce an
> inconsistent state in the dpkg db. And the real problem is that there
> might not be an easy manual fix by the users if the status data could
> not be completely written to the update file.

I take this back, the fseek() needs to be there to guarantee that the
data has been written. So moving it would only help partially, as we
would always be writting at the beginning but the fwrite() might not
have enough space from the reserved padding, and the data might get
truncated.

> The other is that when onerr_abort is signaled dpkg should not
> continue processing anything anymore, it should just do whatever cleanup
> is required and exit. But that can wait probably post-lenny.

So this is the proper fix, and it should not be that big, probably less
than 10 lines? Will cook something today or tomorrow...

regards,
guillem



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to