corrupted file from download, not recoverable without messing about

Bug #68202 reported by Ian Jackson
10
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Fix Released
Medium
Michael Vogt

Bug Description

I was testing an install produced from the edgy 20061024 i386 dvd. I decided to tell the machine to hibernate while synaptic was downloading the packages files for Universe; I restarted the machine a few minutes later, and as expected the download resumed.

However one of the Packages files was corrupted. The only way I was able to restore the situation was to delete the file myself from /var/lib/apt/lists/partial.

Furthermore, libadns1-bin was not available for installation afterwards, suggesting further problems. Note that I chose to install libadns1-bin while ubiquity was running in the livecd making the install in question; that may be relevant.

Revision history for this message
Michael Vogt (mvo) wrote :

I tag this for beta, what apt should do is to delete files in partial that can't be uncompressed

Changed in apt:
importance: Undecided → Medium
status: Unconfirmed → Confirmed
Revision history for this message
Tollef Fog Heen (tfheen) wrote :

Bringing milestone forward

Tollef Fog Heen (tfheen)
Changed in apt:
assignee: nobody → mvo
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your bugreport.

I tried today to reproduce what might cause the failure and I was unable to reproduce it. The code should ensure that file that are invalid gets deleted.

Here is the testcode I used to corrupt a half downloaded .gz file (for my own later reference):
#!/usr/bin/python
import os
import sys
atime = os.stat(sys.argv[1])[7]
mtime = os.stat(sys.argv[1])[8]
d = open(sys.argv[1],"r").read()
s="xxxx"
s += d[4:]
open(sys.argv[1],"w").write(s)
os.utime(sys.argv[1], (atime, mtime))

Cheers,
 Michael

Changed in apt:
status: Confirmed → Needs Info
Revision history for this message
Michael Vogt (mvo) wrote :

This should be fixed in my bzr archive now. The file in partial/ will be deleted if there is a error on decompression.

Changed in apt:
status: Needs Info → Fix Committed
Revision history for this message
Marco Rodrigues (gothicx) wrote :

Not yet fix released with apt 7 on gutsy ?

Michael Vogt (mvo)
Changed in apt:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.