summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/debindexfile.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/deb/debindexfile.cc')
-rw-r--r--apt-pkg/deb/debindexfile.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc
index af1209ccb..1e8c04033 100644
--- a/apt-pkg/deb/debindexfile.cc
+++ b/apt-pkg/deb/debindexfile.cc
@@ -66,7 +66,10 @@ pkgSrcRecords::Parser *debSourcesIndex::CreateSrcParser() const
string SourcesURI = _config->FindDir("Dir::State::lists") +
URItoFileName(IndexURI("Sources"));
string SourcesURIgzip = SourcesURI + ".gz";
- if (!FileExists(SourcesURI) && FileExists(SourcesURIgzip))
+
+ if (!FileExists(SourcesURI) && !FileExists(SourcesURIgzip))
+ return NULL;
+ else if (!FileExists(SourcesURI) && FileExists(SourcesURIgzip))
SourcesURI = SourcesURIgzip;
return new debSrcRecordParser(SourcesURI,this);
@@ -324,8 +327,14 @@ bool debPackagesIndex::Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const
return _error->Error("Problem with MergeList %s",PackageFile.c_str());
// Check the release file
- string ReleaseFile = debReleaseIndex(URI,Dist).MetaIndexFile("Release");
+ string ReleaseFile = debReleaseIndex(URI,Dist).MetaIndexFile("InRelease");
+ bool releaseExists = false;
if (FileExists(ReleaseFile) == true)
+ releaseExists = true;
+ else
+ ReleaseFile = debReleaseIndex(URI,Dist).MetaIndexFile("Release");
+
+ if (releaseExists == true || FileExists(ReleaseFile) == true)
{
FileFd Rel(ReleaseFile,FileFd::ReadOnly);
if (_error->PendingError() == true)