Explorar o código

apt-pkg/deb/debindexfile.cc: Fix one more place to check for gzipped indexes, to work with apt-get source as well

martin@piware.de %!s(int64=16) %!d(string=hai) anos
pai
achega
94e8c9d4df
Modificáronse 1 ficheiros con 7 adicións e 3 borrados
  1. 7 3
      apt-pkg/deb/debindexfile.cc

+ 7 - 3
apt-pkg/deb/debindexfile.cc

@@ -63,9 +63,13 @@ string debSourcesIndex::SourceInfo(pkgSrcRecords::Parser const &Record,
 /* */
 /* */
 pkgSrcRecords::Parser *debSourcesIndex::CreateSrcParser() const
 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	/*{{{*/
 // SourcesIndex::Describe - Give a descriptive path to the index	/*{{{*/