// We do not add self referencing provides
if (Ver.ParentPkg().Name() == PkgName && (PkgArch == Ver.ParentPkg().Arch() ||
// We do not add self referencing provides
if (Ver.ParentPkg().Name() == PkgName && (PkgArch == Ver.ParentPkg().Arch() ||
- (PkgArch == "all" && strcmp((Cache.StrP + Cache.HeaderP->Architecture), Ver.ParentPkg().Arch()) == 0)))
+ (PkgArch == "all" && strcmp((Cache.StrP + Cache.HeaderP->Architecture), Ver.ParentPkg().Arch()) == 0)) &&
+ (Version.empty() || Version == Ver.VerStr()))
// Map it
FileFd CacheF(CacheFile,FileFd::ReadOnly);
std::unique_ptr<MMap> Map(new MMap(CacheF,0));
// Map it
FileFd CacheF(CacheFile,FileFd::ReadOnly);
std::unique_ptr<MMap> Map(new MMap(CacheF,0));
pkgSourceList const * const List,
FileIterator const Start, FileIterator const End)
{
pkgSourceList const * const List,
FileIterator const Start, FileIterator const End)
{
std::unique_ptr<DynamicMMap> &Map, OpProgress * const Progress, std::string const &FileName)
{
Map.reset(CreateDynamicMMap(NULL, 0));
std::unique_ptr<DynamicMMap> &Map, OpProgress * const Progress, std::string const &FileName)
{
Map.reset(CreateDynamicMMap(NULL, 0));
FileFd CacheF(FileName, FileFd::ReadOnly);
if (CacheF.IsOpen() == false || CacheF.Failed())
return false;
FileFd CacheF(FileName, FileFd::ReadOnly);
if (CacheF.IsOpen() == false || CacheF.Failed())
return false;
MMap **OutMap, bool AllowMem)
{ return pkgCacheGenerator::MakeStatusCache(List, &Progress, OutMap, AllowMem); }
bool pkgCacheGenerator::MakeStatusCache(pkgSourceList &List,OpProgress *Progress,
MMap **OutMap, bool AllowMem)
{ return pkgCacheGenerator::MakeStatusCache(List, &Progress, OutMap, AllowMem); }
bool pkgCacheGenerator::MakeStatusCache(pkgSourceList &List,OpProgress *Progress,
// At this point we know we need to construct something, so get storage ready
std::unique_ptr<DynamicMMap> Map(CreateDynamicMMap(NULL, 0));
// At this point we know we need to construct something, so get storage ready
std::unique_ptr<DynamicMMap> Map(CreateDynamicMMap(NULL, 0));
{ return pkgCacheGenerator::MakeOnlyStatusCache(&Progress, OutMap); }
bool pkgCacheGenerator::MakeOnlyStatusCache(OpProgress *Progress,DynamicMMap **OutMap)
{
{ return pkgCacheGenerator::MakeOnlyStatusCache(&Progress, OutMap); }
bool pkgCacheGenerator::MakeOnlyStatusCache(OpProgress *Progress,DynamicMMap **OutMap)
{
map_filesize_t CurrentSize = 0;
map_filesize_t TotalSize = 0;
TotalSize = ComputeSize(NULL, Files.begin(), Files.end());
map_filesize_t CurrentSize = 0;
map_filesize_t TotalSize = 0;
TotalSize = ComputeSize(NULL, Files.begin(), Files.end());