Bug#328485: update also leaves behind files it cannot unzip

October 29th, 2005 - 07:50 am ET by jrodman | Report spam
I use the round-robin name http.us.debian.org in my apt.sources file.
For some reason, the Sources.gz file on one or more of the mirrors is
incorrectly constructed, or possibly I am receiving an error document.
I have not successfully investigated this aspect yet.

However, after this occurs, apt will never recover, leaving the invalid
Sources.gz in partial despite attempts to update again, blocking
successful acquisition of a valid Sources.gz

Running: su -c "apt-get update"
Password:
Ign file: apt-build Release.gpg
Get:1 file: apt-build Release [89B]
Ign file: apt-build/main Packages
Ign http://www.rcdrummond.net sid Release.gpg
Ign http://www.rcdrummond.net sid Release
Ign http://www.rcdrummond.net sid/main Packages
Get:2 http://http.us.debian.org testing Release.gpg [189B]
Get:3 http://http.us.debian.org unstable Release.gpg [189B]
Hit http://www.rcdrummond.net sid/main Packages
Hit ftp://ftp.sonic.net testing Release.gpg
Ign http://mayhq.org ./ Release.gpg
Hit http://http.us.debian.org testing Release
Get:4 ftp://ftp.sonic.net testing Release [35.9kB]
Ign http://mayhq.org ./ Release
Ign http://exodus.xmms.se stable Release.gpg
Hit http://http.us.debian.org unstable Release
Hit http://mayhq.org ./ Packages
Hit http://http.us.debian.org testing/main Sources
Hit http://http.us.debian.org testing/contrib Sources
Ign http://exodus.xmms.se stable Release
Hit http://mayhq.org ./ Sources
Ign http://http.us.debian.org testing/non-free Sources
Hit http://http.us.debian.org unstable/main Packages
Hit http://http.us.debian.org unstable/non-free Packages
Ign http://exodus.xmms.se stable/main Packages
Get:5 ftp://ftp.nerim.net etch Release.gpg [189B]
Hit http://http.us.debian.org unstable/contrib Packages
Get:6 http://exodus.xmms.se stable/main Packages [2581B]
Hit http://http.us.debian.org unstable/main Sources
Hit http://http.us.debian.org unstable/non-free Sources
Hit http://http.us.debian.org unstable/contrib Sources
Get:7 http://http.us.debian.org testing/non-free Sources [23.2kB]
99% [7 Sources gzip 0] [Query] [5 Release.gpg 0/189B 0%]
gzip: stdin: not in gzip format
Err http://http.us.debian.org testing/non-free Sources
Sub-process gzip returned an error code (1)
Hit ftp://ftp.sonic.net testing/main Packages
Hit ftp://ftp.sonic.net testing/contrib Packages
Hit ftp://ftp.sonic.net testing/non-free Packages
Hit ftp://ftp.nerim.net etch Release
Hit ftp://ftp.nerim.net etch/main Packages
Fetched 38.8kB in 5s (7510B/s)
Failed to fetch http://http.us.debian.org/debian/di...Sources.gz Sub-process gzip returned an error code (1)
Reading package lists... Done

This will never succeed.

Skonnos:/var/lib/apt/lists/partial# rm http.us.debian.org_debian_dists_testing_non-free_source_Sources

Now it will succeed.

Skonnos:/var/lib/apt/lists/partial# feta update

Running: apt-get update
Ign file: apt-build Release.gpg
Get:1 file: apt-build Release [89B]
Ign file: apt-build/main Packages
Ign http://www.rcdrummond.net sid Release.gpg
Ign http://www.rcdrummond.net sid Release
Get:2 http://http.us.debian.org testing Release.gpg [189B]
Get:3 http://http.us.debian.org unstable Release.gpg [189B]
Ign http://www.rcdrummond.net sid/main Packages
Hit http://www.rcdrummond.net sid/main Packages
Hit http://http.us.debian.org testing Release
Hit ftp://ftp.sonic.net testing Release.gpg
Ign http://exodus.xmms.se stable Release.gpg
Ign http://mayhq.org ./ Release.gpg
Hit http://http.us.debian.org unstable Release
Get:4 ftp://ftp.sonic.net testing Release [35.9kB]
Ign http://exodus.xmms.se stable Release
Ign http://mayhq.org ./ Release
Hit http://http.us.debian.org testing/main Sources
Hit http://http.us.debian.org testing/contrib Sources
Ign http://exodus.xmms.se stable/main Packages
Hit http://mayhq.org ./ Packages
Get:5 http://http.us.debian.org testing/non-free Sources [20.2kB]
Hit http://mayhq.org ./ Sources
Get:6 http://exodus.xmms.se stable/main Packages [2581B]
Hit ftp://ftp.nerim.net etch Release.gpg
Hit http://http.us.debian.org unstable/main Packages
Hit http://http.us.debian.org unstable/non-free Packages
Hit http://http.us.debian.org unstable/contrib Packages
Hit http://http.us.debian.org unstable/main Sources
Hit http://http.us.debian.org unstable/non-free Sources
Hit http://http.us.debian.org unstable/contrib Sources
Hit ftp://ftp.nerim.net etch Release
Hit ftp://ftp.sonic.net testing/main Packages
Hit ftp://ftp.sonic.net testing/contrib Packages
Hit ftp://ftp.sonic.net testing/non-free Packages
Hit ftp://ftp.nerim.net etch/main Packages
Fetched 58.8kB in 5s (10.9kB/s)
Reading package lists... Done

apt Version: 0.6.42.1

-josh


To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
email Follow the discussionReplies 2 repliesReplies Make a reply

Replies

#1 Michael Vogt
October 29th, 2005 - 10:50 am ET | Report spam

On Sat, Oct 29, 2005 at 04:38:10AM -0700, wrote:
I use the round-robin name http.us.debian.org in my apt.sources file.
For some reason, the Sources.gz file on one or more of the mirrors is
incorrectly constructed, or possibly I am receiving an error document.
I have not successfully investigated this aspect yet.

However, after this occurs, apt will never recover, leaving the invalid
Sources.gz in partial despite attempts to update again, blocking
successful acquisition of a valid Sources.gz


[..]

Thanks for your bugreport.

It will eventually recover when it gets a newer If-Modified-Since
value for the file. Still I think there is not a lot value in keeping
a file around in partial that was successfully downloaded but that
can't be uncompressed. Could you please have a look at the attached
patch and check if it solves your problem?

Cheers,
Michael


Linux is not The Answer. Yes is the answer. Linux is The Question. - Neo


* looking for /apt--mvo--0--patch-84 to compare with
* comparing to /apt--mvo--0--patch-84: . done.

* modified files

orig/apt-pkg/acquire-item.cc
+++ mod/apt-pkg/acquire-item.cc
@@ -183,8 +183,14 @@

void pkgAcqIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
{
+ // if we are in Decompression state and that fails, remove the
+ // file from partial, no need to keep a broken file around
+ if (Decompression == true)
+ unlink(DestFile.c_str());
+
// no .bz2 found, retry with .gz
- if(Desc.URI.substr(Desc.URI.size()-3,Desc.URI.size()-1) == "bz2") {
+ if(Desc.URI.substr(Desc.URI.size()-3,Desc.URI.size()-1) == "bz2")
+ {
Desc.URI = Desc.URI.substr(0,Desc.URI.size()-3) + "gz";

// retry with a gzip one






To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact

Similar topics