FS#5830 - pacman should automatically redownload missing package files

Attached to Project: Pacman
Opened by Scott H (stonecrest) - Tuesday, 14 November 2006, 04:51 GMT
Last edited by Dan McGee (toofishes) - Wednesday, 23 March 2011, 15:39 GMT
Task Type Feature Request
Category
Status Closed
Assigned To Aaron Griffin (phrakture)
Architecture not specified
Severity Low
Priority Normal
Reported Version 0.7.2 Gimmick
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Users can sometimes encounter issues where pacman errors out because it cannot find, e.g., /var/lib/pacman/foo/depends - it would be nice if pacman recognized this and redownloaded the necessary file.

I'm not sure if there are any other possible corruptions or missing files that can be detected and fixed, but this sort of thing is really helpful for the end user.
This task depends upon

Closed by  Dan McGee (toofishes)
Wednesday, 23 March 2011, 15:39 GMT
Reason for closing:  Won't fix
Additional comments about closing:  This is ooooooold...
Comment by Roman Kyrylych (Romashka) - Wednesday, 15 November 2006, 19:10 GMT
pacman -Sy should help in that cases.
Comment by Roman Kyrylych (Romashka) - Thursday, 16 November 2006, 01:55 GMT
I was wrong. Deleting /var/lib/pacman/local/foo/ and then pacman -Sy helps.
Comment by Travis Willard (Cerebral) - Saturday, 24 March 2007, 01:12 GMT
> I was wrong. Deleting /var/lib/pacman/local/foo/ and then pacman -Sy helps.

Yes, but in the case where you have foo installed on your system, this 'fools' pacman into thinking foo is no longer present. If you have foo installed, and pacman says it can't find /var/lib/pacman/local/foo/depends, then force-reinstall foo:

pacman -Sf foo
Comment by Dan McGee (toofishes) - Monday, 07 May 2007, 20:27 GMT
If the sync databases are corrupted, then a pacman -Syy should fix up all of those problems. For the local databases, I don't see a much better solution in the near-term future besides the above suggested pacman -Sf foo. Local DB entries are surprisingly different than their sync counterparts.
Comment by Aaron Griffin (phrakture) - Friday, 11 May 2007, 17:34 GMT
Yeah there are code comments about this - fixing a sync database is as easy as going "whoops, broken, lets redownload", but fixing a local database is problematic.

It might be best just to warn like so:
------8<-----------
WARNING: An installed package has been found with a corrupt database entry
Please reinstall this package to fix the corrupt entry
error: package 'foo' is corrupt, removing from package cache
------>8-----------
Comment by Scott H (stonecrest) - Friday, 21 September 2007, 15:27 GMT Comment by Aaron Griffin (phrakture) - Friday, 21 September 2007, 17:04 GMT
@stonecrest: We all know the error. I'm not sure if you're being passive aggressive or not here.

The simple fact is, we apparently don't find this super critical at the moment. If *you* do, go ahead and send us a patch. I even have a comment in the code on HOW and WHERE to do it.
Comment by Xavier (shining) - Friday, 21 September 2007, 20:41 GMT
Does anyone know why it happens in the first place (or have some ideas) ?
Comment by Aaron Griffin (phrakture) - Friday, 21 September 2007, 20:45 GMT
Interrupted unpacking of the archive would be my guess.
Comment by Xavier (shining) - Friday, 21 September 2007, 20:56 GMT
At least, pacman catch ctrl+c so that it can't be interrupted with it during extraction of a package.
There are probably other ways to interrupt it though. Maybe when the filesystem is full also.
But I suppose this shouldn't happen too frequently.
Comment by Allan McRae (Allan) - Saturday, 30 May 2009, 08:33 GMT
I reopened as "pacman -Syy" is not automatic like the bug asks for. And the warning suggested in an above comments has not been implemented.

Loading...