From a473295d01ed9c599926d9a8c212d4e1a404f78b Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Tue, 29 Nov 2016 22:40:20 -0800 Subject: Store tags in the cache (they are very useful :/). --- apt-pkg/pkgcachegen.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'apt-pkg/pkgcachegen.h') diff --git a/apt-pkg/pkgcachegen.h b/apt-pkg/pkgcachegen.h index cb51c113a..541e143ba 100644 --- a/apt-pkg/pkgcachegen.h +++ b/apt-pkg/pkgcachegen.h @@ -128,6 +128,7 @@ class APT_HIDDEN pkgCacheGenerator /*{{{*/ uint8_t const Type, map_pointer_t* &OldDepLast); bool NewProvides(pkgCache::VerIterator &Ver, pkgCache::PkgIterator &Pkg, map_stringitem_t const ProvidesVersion, uint8_t const Flags); + bool NewTag(pkgCache::VerIterator &Ver,const char *NameStart,unsigned int NameSize); public: @@ -209,6 +210,7 @@ class APT_HIDDEN pkgCacheListParser uint8_t const Flags); bool NewProvidesAllArch(pkgCache::VerIterator &Ver, APT::StringView Package, APT::StringView Version, uint8_t const Flags); + bool NewTag(pkgCache::VerIterator &Ver,const char *NameStart,unsigned int NameSize); #endif public: -- cgit v1.2.3 From 35d8bb14e1102f0231432c7ad33be414e07a15e6 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Wed, 1 Feb 2017 07:28:12 -0800 Subject: Tags should use StoreString, not WriteStringInMap. --- apt-pkg/pkgcachegen.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'apt-pkg/pkgcachegen.h') diff --git a/apt-pkg/pkgcachegen.h b/apt-pkg/pkgcachegen.h index 541e143ba..27fd8d4d0 100644 --- a/apt-pkg/pkgcachegen.h +++ b/apt-pkg/pkgcachegen.h @@ -78,6 +78,7 @@ class APT_HIDDEN pkgCacheGenerator /*{{{*/ std::unordered_set strPkgNames; std::unordered_set strVersions; std::unordered_set strSections; + std::unordered_set strTags; #endif friend class pkgCacheListParser; @@ -132,7 +133,7 @@ class APT_HIDDEN pkgCacheGenerator /*{{{*/ public: - enum StringType { MIXED, PKGNAME, VERSIONNUMBER, SECTION }; + enum StringType { MIXED, PKGNAME, VERSIONNUMBER, SECTION, TAG }; map_stringitem_t StoreString(StringType const type, const char * S, unsigned int const Size); #ifdef APT_PKG_EXPOSE_STRING_VIEW -- cgit v1.2.3