Browse Source

* 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 years ago
parent
commit
80fbbbd917
2 changed files with 13 additions and 0 deletions
  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

@@ -4,6 +4,10 @@ apt (0.7.14ubuntu6) UNRELEASED; urgency=low
     - remove "linux-image" (and friends) from the auto-remove
       blacklist. we have the kernel fallback infrastructure now
       in intrepid (thanks to BenC)
+  * 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 <michael.vogt@ubuntu.com>  Thu, 07 Aug 2008 16:28:05 +0200