[Aptitude-devel] Bug#405506: aptitude cannot parse package file

Manuel A. Fernandez Montecelo manuel.montezelo at gmail.com
Wed Mar 9 00:15:15 UTC 2016


Control: tags -1 - moreinfo + pending


2014-02-05 21:22 To 405506 at bugs.debian.org:
>Control: tags -1 + moreinfo - unreproducible
>Control: severity -1 wishlist
>Control: retitle -1 handle corrupted pkgstate more gracefully
>
>I think that if this bug is to be kept open and fixed, this proposal
>from Daniel Burrows is the way to go (and the only remaining useful
>bit from the bug report).  Retitling etc. accordingly.
>
>-------------
>
>  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)

I addressed this, marking as +pending.

It doesn't offer to do all the things above, because it's complicate and
prone to get things wrong for something that shouldn't happen very often
at all... but now it detects when the file is corrupt/malformed and
suggests the user to try to recover from pkgstates.old.


-- 
Manuel A. Fernandez Montecelo <manuel.montezelo at gmail.com>



More information about the Aptitude-devel mailing list