From 092ae175f070124ba0857429609e5613a4606934 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 4 Jan 2006 17:52:59 +0000 Subject: * make apt-get source smarter about not downloading the same sources twice --- debian/changelog | 2 ++ 1 file changed, 2 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 86ca0135d..36c8b82fd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ apt (0.6.43.1) unstable; urgency=low * Merge bubulle@debian.org--2005/apt--main--0 up to patch-133: * fr.po: Completed to 510 strings + * apt-get source won't download already downloaded files again + (closes: #79277) -- Michael Vogt Wed, 30 Nov 2005 10:14:02 +0100 -- cgit v1.2.3-70-g09d2 From 8ccc92629a274f8ee3ff38531dfc1e954bfa6506 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 5 Jan 2006 19:59:51 +0000 Subject: * 2006 ftp-archive signing key added --- debian/changelog | 1 + share/debian-archive.gpg | Bin 2717 -> 4171 bytes 2 files changed, 1 insertion(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index e8459cba7..e6681c480 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,7 @@ apt (0.6.43.1) unstable; urgency=low * eu.po: Completed to 510 strings (Closes: #342091) * apt-get source won't download already downloaded files again (closes: #79277) + * share/debian-archive.gpg: new 2006 ftp-archive signing key added -- diff --git a/share/debian-archive.gpg b/share/debian-archive.gpg index bb5ed5033..ce412117d 100644 Binary files a/share/debian-archive.gpg and b/share/debian-archive.gpg differ -- cgit v1.2.3-70-g09d2 From f381d68d3c1de8e96dfb2a2ebe36c8577729ec44 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 5 Jan 2006 21:11:29 +0000 Subject: * be more clever about I-M-S hits for the Release file and gpg-failures with it, requeue it without i-m-s then --- apt-pkg/acquire-item.cc | 27 +++++++++++++++++++++++++-- apt-pkg/acquire-item.h | 1 + debian/changelog | 1 + 3 files changed, 27 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 1c5866a4a..b9fc74456 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -430,7 +430,7 @@ pkgAcqMetaIndex::pkgAcqMetaIndex(pkgAcquire *Owner, const vector* IndexTargets, indexRecords* MetaIndexParser) : Item(Owner), RealURI(URI), SigFile(SigFile), AuthPass(false), - MetaIndexParser(MetaIndexParser), IndexTargets(IndexTargets) + MetaIndexParser(MetaIndexParser), IndexTargets(IndexTargets), IMSHit(false) { DestFile = _config->FindDir("Dir::State::lists") + "partial/"; DestFile += URItoFileName(URI); @@ -523,6 +523,9 @@ void pkgAcqMetaIndex::RetrievalDone(string Message) return; } + // see if the download was a IMSHit + IMSHit = StringToBool(LookupTag(Message,"IMS-Hit"),false); + Complete = true; string FinalFile = _config->FindDir("Dir::State::lists"); @@ -688,10 +691,30 @@ void pkgAcqMetaIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf) { if (AuthPass == true) { - // gpgv method failed + // if we fail the authentication but got the file via a IMS-Hit + // this means that the file wasn't downloaded and that it might be + // just stale (server problem, proxy etc). we delete what we have + // queue it again without i-m-s + // alternatively we could just unlink the file and let the user try again + if (IMSHit) + { + Complete = false; + Local = false; + AuthPass = false; + unlink(DestFile.c_str()); + + DestFile = _config->FindDir("Dir::State::lists") + "partial/"; + DestFile += URItoFileName(RealURI); + Desc.URI = RealURI; + QueueURI(Desc); + return; + } + + // gpgv method failed _error->Warning("GPG error: %s: %s", Desc.Description.c_str(), LookupTag(Message,"Message").c_str()); + } // No Release file was present, or verification failed, so fall diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h index c34b5ef69..e6fc7fc47 100644 --- a/apt-pkg/acquire-item.h +++ b/apt-pkg/acquire-item.h @@ -151,6 +151,7 @@ class pkgAcqMetaIndex : public pkgAcquire::Item const vector* IndexTargets; indexRecords* MetaIndexParser; bool AuthPass; + bool IMSHit; // required to fail gracefully on failures bool VerifyVendor(); void RetrievalDone(string Message); diff --git a/debian/changelog b/debian/changelog index e6681c480..5c1b1347e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,6 +15,7 @@ apt (0.6.43.1) unstable; urgency=low * apt-get source won't download already downloaded files again (closes: #79277) * share/debian-archive.gpg: new 2006 ftp-archive signing key added + * redownload the Release file if IMS-Hit and gpg failure -- -- cgit v1.2.3-70-g09d2