Welcome to the Pacman bug tracker. Please search the current bugs and feature requests before filing a new one! Use advanced search and select "Search in Comments".

* Please select the correct category and version.
* Write a descriptive summary, background info, and provide a reproducible test case whenever possible.

FS#5909 - pacman3: corrupted package action

Attached to Project: Pacman
Opened by James Rayner (iphitus) - Tuesday, 28 November 2006, 11:58 GMT
Last edited by Roman Kyrylych (Romashka) - Monday, 14 May 2007, 18:33 GMT
Task Type Feature Request
Category General
Status Assigned   Reopened
Assigned To Aaron Griffin (phrakture)
Dan McGee (toofishes)
Architecture All
Severity Low
Priority Normal
Reported Version 0.7.2 Gimmick
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 9
Private No


checking package integrity...
:: Archive gcc-4.1.2-1.pkg.tar.gz is corrupted. Do you want to delete it? [Y/n]
error: failed to commit transaction (corrupted package)
archive gcc-4.1.2-1.pkg.tar.gz was corrupted (bad MD5 or SHA1 checksum)

errors occurred, no packages were upgraded.

good to see pacman3 doing something slightly more intelligent than barfing right away, but maybe the option would be much better as: "do you want to delete and redownload?"

This task depends upon

Comment by Aaron Griffin (phrakture) - Monday, 12 February 2007, 00:16 GMT
Re-opened, just removed from the 3.0 bug catcher
Comment by Dan McGee (toofishes) - Monday, 16 July 2007, 02:08 GMT
This is probably going to need some refactoring and reordering of code to make possible. Currently pacman does things in a very linear fashion, and I don't know how well out of order downloading would work.
Comment by Scott H (stonecrest) - Monday, 10 March 2008, 01:11 GMT
I would go even further than James and suggest that there is no good reason to be asking the user anything here. To me, it's no different than when a mirror doesn't sync correctly - pacman cascades to the next mirror until a successful sync. I'd expect it to do the same here (with maybe 1 retry, at which point pacman assumes the file on the mirror is corrupt).

At the minimum, I certainly wouldn't be asking the user if they want to delete the file, since I can't think of a use case where the user would want a corrupt file retained. I can understand potentially asking if the user wants to redownload it since it can be a huge download like openoffice - but realistically the user is probably going to try redownloading again anyway, otherwise they won't know if the file on the server is corrupt or just their download of it.
Comment by Scott H (stonecrest) - Monday, 10 March 2008, 01:14 GMT
Sorry, just to be clear.. when I say "I'd expect it to do the same here", I don't mean to suggest that it should try redownloading the file from a different mirror (well, maybe in an ideal world where the code changes to implement this were trivial..). I just mean that I'd expect pacman to try again, whatever that entails. In this case, the simple thing would be to try again from the same mirror.
Comment by Allan McRae (Allan) - Sunday, 22 April 2012, 12:13 GMT
Old bug...

Pacman now queries if you want to delete the package, but redownloading is done on the next attempt at installing it.