summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/debmetaindex.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-06-21 16:47:53 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2015-08-10 17:25:26 +0200
commit463c8d801595ce5ac94d7c032264820be7434232 (patch)
tree79963d92b9766709b07d0c5cbc42638896d3450e /apt-pkg/deb/debmetaindex.h
parent3d8232bf97ce11818fb07813a71136484ea1a44a (diff)
support lang= and target= sources.list options
We support arch= for a while, now we finally add lang= as well and as a first simple way of controlling which targets to acquire also target=. This asked for a redesign of the internal API of parsing and storing information about 'deb' and 'deb-src' lines. As this API isn't visible to the outside no damage done through. Beside being a nice cleanup (= it actually does more in less lines) it also provides us with a predictable order of architectures as provides in the configuration rather than based on string sorting-order, so that now the native architecture is parsed/displayed first. Observeable e.g. in apt-get output.
Diffstat (limited to 'apt-pkg/deb/debmetaindex.h')
-rw-r--r--apt-pkg/deb/debmetaindex.h38
1 files changed, 13 insertions, 25 deletions
diff --git a/apt-pkg/deb/debmetaindex.h b/apt-pkg/deb/debmetaindex.h
index 648c22436..9b60b6137 100644
--- a/apt-pkg/deb/debmetaindex.h
+++ b/apt-pkg/deb/debmetaindex.h
@@ -1,4 +1,3 @@
-// ijones, walters
#ifndef PKGLIB_DEBMETAINDEX_H
#define PKGLIB_DEBMETAINDEX_H
@@ -22,26 +21,20 @@ class debDebPkgFileIndex;
class IndexTarget;
class pkgCacheGenerator;
class OpProgress;
+class debReleaseIndexPrivate;
-class APT_HIDDEN debReleaseIndex : public metaIndex {
- public:
+class APT_HIDDEN debReleaseIndex : public metaIndex
+{
+ debReleaseIndexPrivate * const d;
- class debSectionEntry
- {
- public:
- debSectionEntry (std::string const &Section, bool const &IsSrc);
- std::string const Section;
- bool const IsSrc;
- };
-
- private:
- /** \brief dpointer placeholder (for later in case we need it) */
- void * const d;
- std::map<std::string, std::vector<debSectionEntry const*> > ArchEntries;
enum APT_HIDDEN { ALWAYS_TRUSTED, NEVER_TRUSTED, CHECK_TRUST } Trusted;
public:
+ APT_HIDDEN std::string MetaIndexInfo(const char *Type) const;
+ APT_HIDDEN std::string MetaIndexFile(const char *Types) const;
+ APT_HIDDEN std::string MetaIndexURI(const char *Type) const;
+
debReleaseIndex(std::string const &URI, std::string const &Dist);
debReleaseIndex(std::string const &URI, std::string const &Dist, bool const Trusted);
virtual ~debReleaseIndex();
@@ -54,22 +47,17 @@ class APT_HIDDEN debReleaseIndex : public metaIndex {
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;
- std::string MetaIndexFile(const char *Types) const;
- std::string MetaIndexURI(const char *Type) const;
-
-#if APT_PKG_ABI >= 413
- virtual
-#endif
- std::string LocalFileName() const;
+ virtual std::string LocalFileName() const;
virtual std::vector <pkgIndexFile *> *GetIndexFiles();
void SetTrusted(bool const Trusted);
virtual bool IsTrusted() const;
- void PushSectionEntry(std::vector<std::string> const &Archs, const debSectionEntry *Entry);
- void PushSectionEntry(std::string const &Arch, const debSectionEntry *Entry);
+ void AddComponent(bool const isSrc, std::string const &Name,
+ std::vector<std::string> const &Targets,
+ std::vector<std::string> const &Architectures,
+ std::vector<std::string> Languages);
};
class APT_HIDDEN debDebFileMetaIndex : public metaIndex