summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire-item.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-06-23 15:16:08 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2015-08-10 17:25:26 +0200
commit5ad0096a4e19e191b59634e8a8817995ec4045ad (patch)
tree70b2310cdff52e809ffebcdfae4ffa4cd42f10fb /apt-pkg/acquire-item.h
parent268ffcebb9ae4278b1e3c3f89f8167f229164dbd (diff)
merge indexRecords into metaIndex
indexRecords was used to parse the Release file – mostly the hashes – while metaIndex deals with downloading the Release file, storing all indexes coming from this release and … parsing the Release file, but this time mostly for the other fields. That wasn't a problem in metaIndex as this was done in the type specific subclass, but indexRecords while allowing to override the parsing method did expect by default a specific format. APT isn't really supporting different types at the moment, but this is a violation of the abstraction we have everywhere else and, which is the actual reason for this merge: Options e.g. coming from the sources.list come to metaIndex naturally, which needs to wrap them up and bring them into indexRecords, so the acquire system is told about it as they don't get to see the metaIndex, but they don't really belong in indexRecords as this is just for storing data loaded from the Release file… the result is a complete mess. I am not saying it is a lot prettier after the merge, but at least adding new options is now slightly easier and there is just one place responsible for parsing the Release file. That can't hurt.
Diffstat (limited to 'apt-pkg/acquire-item.h')
-rw-r--r--apt-pkg/acquire-item.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h
index 4d235dce2..10ece76c9 100644
--- a/apt-pkg/acquire-item.h
+++ b/apt-pkg/acquire-item.h
@@ -34,7 +34,6 @@
#include <apt-pkg/vendor.h>
#include <apt-pkg/sourcelist.h>
#include <apt-pkg/pkgrecords.h>
-#include <apt-pkg/indexrecords.h>
#endif
/** \addtogroup acquire
@@ -43,11 +42,11 @@
* \file acquire-item.h
*/
-class indexRecords;
class pkgRecords;
class pkgSourceList;
class pkgAcqMetaClearSig;
class pkgAcqIndexMergeDiffs;
+class metaIndex;
class pkgAcquire::Item : public WeakPointable /*{{{*/
/** \brief Represents the process by which a pkgAcquire object should
@@ -559,8 +558,8 @@ class APT_HIDDEN pkgAcqMetaClearSig : public pkgAcqMetaIndex
public:
/** \brief A package-system-specific parser for the meta-index file. */
- indexRecords *MetaIndexParser;
- indexRecords *LastMetaIndexParser;
+ metaIndex *MetaIndexParser;
+ metaIndex *LastMetaIndexParser;
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf);
virtual std::string Custom600Headers() const;
@@ -573,7 +572,7 @@ class APT_HIDDEN pkgAcqMetaClearSig : public pkgAcqMetaIndex
IndexTarget const &DetachedDataTarget,
IndexTarget const &DetachedSigTarget,
std::vector<IndexTarget> const &IndexTargets,
- indexRecords * const MetaIndexParser);
+ metaIndex * const MetaIndexParser);
virtual ~pkgAcqMetaClearSig();
};
/*}}}*/