On Thu, Jan 04, 2007 at 11:49:39AM -0500, Joey Hess <[EMAIL PROTECTED]> was 
heard to say:
> [EMAIL PROTECTED] wrote:
> > While I'm waiting for someone to *fix* bug 405506, does anyone have an 
> > idea how to recover from it?  Is a reinstall in order?
> > 
> > Yesterday aptitude reported
> >   Unable to parse package file /var/lib/aptitude/pkgstates
> > This happened on an etch that was just installed the same day from a 
> > previous-day netinstall daily build.
> > 
> > The file does exist, and appears to be binary gibberish.
> 
> In the bug report, you say:
> 
> | tried startx, got the black screen of death -- completely unresponsive
> | to mouse or keyboard.
> 
> Hard rebooting a wedged system can result in corrupted files in rare
> cases, and it sounds like this is what you have. The pkgstates file is a
> plain text file. The chances of this being an aptitude bug seem very
> near to zero. Unless you or someone else can reproduce the bug (either
> the hang starting X or the file system corruption), it's certianly not
> grave severity.

  Maybe aptitude should offer to restore pkgstate.old or move the corrupt
file out of the way.  This would be a bit more graceful than going "gaaack"
and dying.

  The basic idea (if the user asks to recover) would be
    (1) move pkgstates to pkgstates.broken.NUM where NUM is the first unused
        number (actually use link(2) to avoid clobbering existing files).
    (2) if pkgstates.old exists, move it to pkgstates.
    (3) if pkgstates exists and is not parsable, go to (1) (i.e., move
        pkgstates.old out of the way and start completely from scratch)

  Daniel

Attachment: signature.asc
Description: Digital signature

Reply via email to