summaryrefslogtreecommitdiff
path: root/apt-pkg/deb
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r--apt-pkg/deb/debmetaindex.cc4
-rw-r--r--apt-pkg/deb/debmetaindex.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc
index 994b95849..b328fcea8 100644
--- a/apt-pkg/deb/debmetaindex.cc
+++ b/apt-pkg/deb/debmetaindex.cc
@@ -422,7 +422,7 @@ bool debReleaseIndex::Merge(pkgCacheGenerator &Gen,OpProgress * /*Prog*/) const/
}
/*}}}*/
// ReleaseIndex::FindInCache - Find this index /*{{{*/
-pkgCache::RlsFileIterator debReleaseIndex::FindInCache(pkgCache &Cache) const
+pkgCache::RlsFileIterator debReleaseIndex::FindInCache(pkgCache &Cache, bool const ModifyCheck) const
{
std::string ReleaseFile;
bool const releaseExists = ReleaseFileName(this, ReleaseFile);
@@ -434,7 +434,7 @@ pkgCache::RlsFileIterator debReleaseIndex::FindInCache(pkgCache &Cache) const
continue;
// empty means the file does not exist by "design"
- if (releaseExists == false && File->Size == 0)
+ if (ModifyCheck == false || (releaseExists == false && File->Size == 0))
return File;
struct stat St;
diff --git a/apt-pkg/deb/debmetaindex.h b/apt-pkg/deb/debmetaindex.h
index 7e9942710..b448ecc53 100644
--- a/apt-pkg/deb/debmetaindex.h
+++ b/apt-pkg/deb/debmetaindex.h
@@ -51,7 +51,7 @@ class APT_HIDDEN debReleaseIndex : public metaIndex {
virtual std::vector<IndexTarget> GetIndexTargets() const;
virtual std::string Describe() const;
- virtual pkgCache::RlsFileIterator FindInCache(pkgCache &Cache) const;
+ virtual pkgCache::RlsFileIterator FindInCache(pkgCache &Cache, bool const ModifyCheck) const;
virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const;
std::string MetaIndexInfo(const char *Type) const;