summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2011-04-08 13:57:04 +0200
committerJulian Andres Klode <jak@debian.org>2011-04-08 13:57:04 +0200
commit7ea7ac9efa88b73fc6ff30483a928ef49b95c015 (patch)
treecb1c4b50250e6283ce15c675d921e7d4bc71f589
parent8220213e48857172d8ebbf3d4914667e372a8930 (diff)
* apt-pkg/acquire-item.cc:
- Use Release files even if they cannot be verified (LP: #704595)
-rw-r--r--apt-pkg/acquire-item.cc20
-rw-r--r--debian/changelog2
2 files changed, 22 insertions, 0 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index 39b9feff2..1d651ba69 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -1502,6 +1502,26 @@ void pkgAcqMetaIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
ReportMirrorFailure("GPGFailure");
}
+ /* Always move the meta index, even if gpgv failed. This ensures
+ * that PackageFile objects are correctly filled in */
+ {
+ string FinalFile = _config->FindDir("Dir::State::lists");
+ FinalFile += URItoFileName(RealURI);
+ /* InRelease files become Release files, otherwise
+ * they would be considered as trusted later on */
+ if (SigFile == DestFile) {
+ RealURI = RealURI.replace(RealURI.rfind("InRelease"), 9,
+ "Release");
+ FinalFile = FinalFile.replace(FinalFile.rfind("InRelease"), 9,
+ "Release");
+ SigFile = FinalFile;
+ }
+ Rename(DestFile,FinalFile);
+ chmod(FinalFile.c_str(),0644);
+
+ DestFile = FinalFile;
+ }
+
// No Release file was present, or verification failed, so fall
// back to queueing Packages files without verification
QueueIndexes(false);
diff --git a/debian/changelog b/debian/changelog
index 34e34c3a6..486a4de8c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,8 @@ apt (0.8.13.3) UNRELEASED; urgency=low
* apt-pkg/indexcopy.cc:
- Use RealFileExists() instead of FileExists(), allows amongst other
things a directory named Sources to exist on a CD-ROM (LP: #750694).
+ * apt-pkg/acquire-item.cc:
+ - Use Release files even if they cannot be verified (LP: #704595)
-- Julian Andres Klode <jak@debian.org> Thu, 07 Apr 2011 11:48:46 +0200