// CacheGenerator::pkgCacheGenerator - Constructor /*{{{*/
// ---------------------------------------------------------------------
// CacheGenerator::pkgCacheGenerator - Constructor /*{{{*/
// ---------------------------------------------------------------------
std::vector<std::string> availDesc = List.AvailableDescriptionLanguages();
for (Ver = Pkg.VersionList(); Ver.end() == false; ++Ver)
{
std::vector<std::string> availDesc = List.AvailableDescriptionLanguages();
for (Ver = Pkg.VersionList(); Ver.end() == false; ++Ver)
{
/* Record the Description(s) based on their master md5sum */
MD5SumValue CurMd5 = List.Description_md5();
/* Record the Description(s) based on their master md5sum */
MD5SumValue CurMd5 = List.Description_md5();
/* Before we add a new description we first search in the group for
a version with a description of the same MD5 - if so we reuse this
/* Before we add a new description we first search in the group for
a version with a description of the same MD5 - if so we reuse this
// CacheGenerator::NewGroup - Add a new group /*{{{*/
// ---------------------------------------------------------------------
/* This creates a new group structure and adds it to the hash table */
// CacheGenerator::NewGroup - Add a new group /*{{{*/
// ---------------------------------------------------------------------
/* This creates a new group structure and adds it to the hash table */
// Insert it into the hash table
unsigned long const Hash = Cache.Hash(Name);
map_pointer_t *insertAt = &Cache.HeaderP->GrpHashTableP()[Hash];
// Insert it into the hash table
unsigned long const Hash = Cache.Hash(Name);
map_pointer_t *insertAt = &Cache.HeaderP->GrpHashTableP()[Hash];
// CacheGenerator::NewPackage - Add a new package /*{{{*/
// ---------------------------------------------------------------------
/* This creates a new package structure and adds it to the hash table */
// CacheGenerator::NewPackage - Add a new package /*{{{*/
// ---------------------------------------------------------------------
/* This creates a new package structure and adds it to the hash table */
pkgCache::GrpIterator Grp;
Dynamic<pkgCache::GrpIterator> DynGrp(Grp);
if (unlikely(NewGroup(Grp, Name) == false))
pkgCache::GrpIterator Grp;
Dynamic<pkgCache::GrpIterator> DynGrp(Grp);
if (unlikely(NewGroup(Grp, Name) == false))
// Insert it into the hash table
map_id_t const Hash = Cache.Hash(Name);
map_pointer_t *insertAt = &Cache.HeaderP->PkgHashTableP()[Hash];
// Insert it into the hash table
map_id_t const Hash = Cache.Hash(Name);
map_pointer_t *insertAt = &Cache.HeaderP->PkgHashTableP()[Hash];
- std::string const NameA = Name.substr(0, found);
- std::string const ArchA = Name.substr(found + 1);
+ StringView const NameA = Name.substr(0, found);
+ StringView const ArchA = Name.substr(found + 1);
/* This creates a Group and the Package to link this dependency to if
needed and handles also the caching of the old endpoint */
bool pkgCacheListParser::NewDepends(pkgCache::VerIterator &Ver,
/* This creates a Group and the Package to link this dependency to if
needed and handles also the caching of the old endpoint */
bool pkgCacheListParser::NewDepends(pkgCache::VerIterator &Ver,
{
int const CmpOp = Op & 0x0F;
// =-deps are used (79:1) for lockstep on same-source packages (e.g. data-packages)
{
int const CmpOp = Op & 0x0F;
// =-deps are used (79:1) for lockstep on same-source packages (e.g. data-packages)
/*}}}*/
// ListParser::NewProvides - Create a Provides element /*{{{*/
bool pkgCacheListParser::NewProvides(pkgCache::VerIterator &Ver,
/*}}}*/
// ListParser::NewProvides - Create a Provides element /*{{{*/
bool pkgCacheListParser::NewProvides(pkgCache::VerIterator &Ver,
-bool pkgCacheListParser::NewProvidesAllArch(pkgCache::VerIterator &Ver, string const &Package,
- string const &Version, uint8_t const Flags) {
+bool pkgCacheListParser::NewProvidesAllArch(pkgCache::VerIterator &Ver, StringView Package,
+ StringView Version, uint8_t const Flags) {
pkgCache &Cache = Owner->Cache;
pkgCache::GrpIterator Grp = Cache.FindGrp(Package);
Dynamic<pkgCache::GrpIterator> DynGrp(Grp);
pkgCache &Cache = Owner->Cache;
pkgCache::GrpIterator Grp = Cache.FindGrp(Package);
Dynamic<pkgCache::GrpIterator> DynGrp(Grp);
switch(type) {
case MIXED: strings = &strMixed; break;
case PKGNAME: strings = &strPkgNames; break;
case VERSIONNUMBER: strings = &strVersions; break;
case SECTION: strings = &strSections; break;
switch(type) {
case MIXED: strings = &strMixed; break;
case PKGNAME: strings = &strPkgNames; break;
case VERSIONNUMBER: strings = &strVersions; break;
case SECTION: strings = &strSections; break;