summaryrefslogtreecommitdiff
path: root/apt-pkg/indexrecords.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-05-29 12:04:51 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-05-29 12:04:51 +0200
commite1430400bf012ab7e29b00c78796a14ce9f97107 (patch)
tree67fbd7a72c808c8f46c7eb74ecc430d091db698e /apt-pkg/indexrecords.cc
parent8fa7eefb8a320e8fa4a26c4718fa606d4d27a56f (diff)
* apt-pkg/indexrecords.{cc,h}:
- add a constant Exists check for MetaKeys * apt-pkg/acquire-item.cc: - do not try PDiff if it is not listed in the Meta file
Diffstat (limited to 'apt-pkg/indexrecords.cc')
-rw-r--r--apt-pkg/indexrecords.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/apt-pkg/indexrecords.cc b/apt-pkg/indexrecords.cc
index 1fc27b1a1..9a9600531 100644
--- a/apt-pkg/indexrecords.cc
+++ b/apt-pkg/indexrecords.cc
@@ -31,6 +31,11 @@ const indexRecords::checkSum *indexRecords::Lookup(const string MetaKey)
return Entries[MetaKey];
}
+bool indexRecords::Exists(string const &MetaKey) const
+{
+ return Entries.count(MetaKey) == 1;
+}
+
bool indexRecords::Load(const string Filename) /*{{{*/
{
FileFd Fd(Filename, FileFd::ReadOnly);