]> git.saurik.com Git - apt.git/commitdiff
apt-pkg/deb/debindexfile.cc: Fix one more place to check for gzipped indexes, to...
authormartin@piware.de <>
Fri, 11 Jun 2010 17:23:08 +0000 (19:23 +0200)
committermartin@piware.de <>
Fri, 11 Jun 2010 17:23:08 +0000 (19:23 +0200)
apt-pkg/deb/debindexfile.cc

index e87c21f135d88a4b87e33fd0ac823c8da64c4afc..9832329c0e3f0be13290ac33fb387e58145e2f84 100644 (file)
@@ -63,9 +63,13 @@ string debSourcesIndex::SourceInfo(pkgSrcRecords::Parser const &Record,
 /* */
 pkgSrcRecords::Parser *debSourcesIndex::CreateSrcParser() const
 {
-   string SourcesURI = URItoFileName(IndexURI("Sources"));
-   return new debSrcRecordParser(_config->FindDir("Dir::State::lists") +
-                                SourcesURI,this);
+   string SourcesURI = _config->FindDir("Dir::State::lists") + 
+      URItoFileName(IndexURI("Sources"));
+   string SourcesURIgzip = SourcesURI + ".gz";
+   if (!FileExists(SourcesURI) && FileExists(SourcesURIgzip))
+      SourcesURI = SourcesURIgzip;
+
+   return new debSrcRecordParser(SourcesURI,this);
 }
                                                                        /*}}}*/
 // SourcesIndex::Describe - Give a descriptive path to the index       /*{{{*/