Просмотр исходного кода

* apt-pkg/indexcopy.cc:
- support having CDs with no Packages file (just a Packages.gz)
by not forcing a verification on non-existing files
(LP: #255545)

Michael Vogt лет назад: 18
Родитель
Сommit
8d357c5290
2 измененных файлов с 13 добавлено и 0 удалено
  1. 9 0
      apt-pkg/indexcopy.cc
  2. 4 0
      debian/changelog

+ 9 - 0
apt-pkg/indexcopy.cc

@@ -522,6 +522,15 @@ bool SigVerify::Verify(string prefix, string file, indexRecords *MetaIndex)
 {
    const indexRecords::checkSum *Record = MetaIndex->Lookup(file);
 
+   // 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))
+   {
+      _error->Warning("Skipping non-exisiting file %s", string(prefix+file).c_str());
+      return true;
+   }
+
    if (!Record) 
    {
       _error->Warning("Can't find authentication record for: %s",file.c_str());

+ 4 - 0
debian/changelog

@@ -31,6 +31,10 @@ apt (0.7.15) UNRELEASED; urgency=low
     by default. This can be changed by setting the value of
     APT::Get::Build-Dep-Automatic to false (thanks to Aaron 
     Haviland, closes: #44874, LP: #248268)
+  * apt-pkg/indexcopy.cc:
+    - support having CDs with no Packages file (just a Packages.gz)
+      by not forcing a verification on non-existing files
+     (LP: #255545)
   
   [ Dereck Wonnacott ]
   * apt-ftparchive might write corrupt Release files (LP: #46439)