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

2005-10-29 Thread jrodman
On Sat, Oct 29, 2005 at 10:13:25AM -0400, Michael Vogt wrote:
> Thanks for your bugreport.
> 
> It will eventually recover when it gets a newer If-Modified-Since
> value for the file. 

Apologies.  I was loose in my language.

By "never", I meant, "regardless of the number of attempts".  When the
next day arrives, or the next Sources.gz file arrives apt will download
a new file.  So far, Murphy has dictated that this file will have the
same flaw.

> Could you please have a look at the attached patch and check if it
> solves your problem?

I will test this out.

-josh


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



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

2005-10-29 Thread Michael Vogt
On Sat, Oct 29, 2005 at 04:38:10AM -0700, [EMAIL PROTECTED] 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 [EMAIL PROTECTED]/apt--mvo--0--patch-84 to compare with
* comparing to [EMAIL PROTECTED]/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 





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

2005-10-29 Thread jrodman
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/dists/testing/non-free/source/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