summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/debindexfile.cc
diff options
context:
space:
mode:
authormartin@piware.de <>2010-06-11 19:23:08 +0200
committermartin@piware.de <>2010-06-11 19:23:08 +0200
commit94e8c9d4df70d2532e1640dfe2700dd63a094a4f (patch)
treed67dfaf1e50ed37001ba4328c68460040a1948ba /apt-pkg/deb/debindexfile.cc
parentb26e2415ee2d4f611966488954f8d4f30fcf827c (diff)
apt-pkg/deb/debindexfile.cc: Fix one more place to check for gzipped indexes, to work with apt-get source as well
Diffstat (limited to 'apt-pkg/deb/debindexfile.cc')
-rw-r--r--apt-pkg/deb/debindexfile.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc
index e87c21f13..9832329c0 100644
--- a/apt-pkg/deb/debindexfile.cc
+++ b/apt-pkg/deb/debindexfile.cc
@@ -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 /*{{{*/