]> git.saurik.com Git - apt.git/commitdiff
merged from the mvo branch
authorMichael Vogt <mvo@debian.org>
Fri, 8 Apr 2011 12:36:08 +0000 (14:36 +0200)
committerMichael Vogt <mvo@debian.org>
Fri, 8 Apr 2011 12:36:08 +0000 (14:36 +0200)
apt-pkg/acquire-item.cc
apt-pkg/indexcopy.cc
debian/changelog

index 39b9feff24f6c8670c2dab5ee74d5061b53cef0c..1d651ba69e5ac3b2f3346655fc2ecfa0023227bf 100644 (file)
@@ -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);
index c2ee1c34726f70de4d73ea055ed69726fbb340cb..064fb007c9decc7f9670b185d827a4886fc0ca5a 100644 (file)
@@ -75,7 +75,7 @@ bool IndexCopy::CopyPackages(string CDROM,string Name,vector<string> &List,
       
       // Open the package file
       FileFd Pkg;
-      if (FileExists(*I + GetFileName()) == true)
+      if (RealFileExists(*I + GetFileName()) == true)
       {
         Pkg.Open(*I + GetFileName(),FileFd::ReadOnly);
         FileSize = Pkg.Size();
@@ -532,7 +532,7 @@ bool SigVerify::Verify(string prefix, string file, indexRecords *MetaIndex)
    // we skip non-existing files in the verifcation to support a cdrom
    // with no Packages file (just a Package.gz), see LP: #255545
    // (non-existing files are not considered a error)
-   if(!FileExists(prefix+file))
+   if(!RealFileExists(prefix+file))
    {
       _error->Warning(_("Skipping nonexistent file %s"), string(prefix+file).c_str());
       return true;
@@ -601,7 +601,7 @@ bool SigVerify::CopyAndVerify(string CDROM,string Name,vector<string> &SigList,
       string const release = *I+"Release";
 
       // a Release.gpg without a Release should never happen
-      if(FileExists(release) == false)
+      if(RealFileExists(release) == false)
       {
         delete MetaIndex;
         continue;
@@ -681,7 +681,7 @@ bool SigVerify::RunGPGV(std::string const &File, std::string const &FileGPG,
    std::vector<string> keyrings;
    if (DirectoryExists(trustedPath))
      keyrings = GetListOfFilesInDir(trustedPath, "gpg", false, true);
-   if (FileExists(trustedFile) == true)
+   if (RealFileExists(trustedFile) == true)
      keyrings.push_back(trustedFile);
 
    std::vector<const char *> Args;
@@ -788,7 +788,7 @@ bool TranslationsCopy::CopyTranslations(string CDROM,string Name,   /*{{{*/
       
       // Open the package file
       FileFd Pkg;
-      if (FileExists(*I) == true)
+      if (RealFileExists(*I) == true)
       {
         Pkg.Open(*I,FileFd::ReadOnly);
         FileSize = Pkg.Size();
index cbaa65748fbf07a2c773fd34dcd3a1856c0b0278..6878debc5e2e91ebda871945ffbd10755b11f141 100644 (file)
@@ -1,8 +1,11 @@
-apt (0.8.13.3) unstable; urgency=low
+apt (0.8.13.3) UNRELEASED; urgency=low
 
-  [ Thorsten Spindler ]
-  * debian/zzapt.cron.daily:
-    - move cron job to the end of execution (LP: #727685)
+  [ Julian Andres Klode ]
+  * 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)
   
   [ Michael Vogt ]
   * mirror method:
@@ -13,7 +16,7 @@ apt (0.8.13.3) unstable; urgency=low
     - run unattended-upgrades even if there was a error during
       the apt-get update (LP: #676295)
 
- -- Michael Vogt <michael.vogt@ubuntu.com>  Thu, 10 Mar 2011 15:56:54 +0100
+ -- Julian Andres Klode <jak@debian.org>  Thu, 07 Apr 2011 11:48:46 +0200
 
 apt (0.8.13.2) unstable; urgency=low