pkgcache.h
Go to the documentation of this file.
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
/*}}}*/
#ifndef PKGLIB_PKGCACHE_H
#define PKGLIB_PKGCACHE_H
#define __PKGLIB_IN_PKGCACHE_H
#include <apt-pkg/macros.h>
#include <apt-pkg/mmap.h>
#include <cstddef> // required for nullptr_t
#include <cstdint>
#include <ctime>
#include <string>
#include <string_view>
// size of (potentially big) files like debs or the install size of them
typedef uint64_t map_filesize_t;
// storing file sizes of indexes, which are way below 4 GB for now
typedef uint32_t map_filesize_small_t;
// each package/group/dependency gets an id
typedef uint32_t map_id_t;
// some files get an id, too, but in far less absolute numbers
typedef uint16_t map_fileid_t;
// relative pointer from cache start
template <typename T> class map_pointer {
uint32_t val;
public:
constexpr map_pointer() noexcept : val(0) {}
constexpr map_pointer(std::nullptr_t) noexcept : val(0) {}
explicit constexpr map_pointer(uint32_t n) noexcept : val(n) {}
explicit constexpr operator uint32_t() const noexcept { return val; }
explicit constexpr operator bool() const noexcept { return val != 0; }
};
template<typename T> constexpr T *operator +(T *p, map_pointer<T> m) noexcept { return p + uint32_t(m); }
template<typename T> constexpr bool operator ==(map_pointer<T> u, map_pointer<T> m) noexcept{ return uint32_t(u) == uint32_t(m); }
template<typename T> constexpr bool operator !=(map_pointer<T> u, map_pointer<T> m) noexcept{ return uint32_t(u) != uint32_t(m); }
template<typename T> constexpr bool operator <(map_pointer<T> u, map_pointer<T> m) noexcept { return uint32_t(u) < uint32_t(m); }
template<typename T> constexpr bool operator >(map_pointer<T> u, map_pointer<T> m) noexcept { return uint32_t(u) > uint32_t(m); }
template<typename T> constexpr uint32_t operator -(map_pointer<T> u, map_pointer<T> m) noexcept { return uint32_t(u) - uint32_t(m); }
template<typename T> constexpr bool operator ==(map_pointer<T> m, std::nullptr_t) noexcept { return uint32_t(m) == 0; }
template<typename T> constexpr bool operator !=(map_pointer<T> m, std::nullptr_t) noexcept { return uint32_t(m) != 0; }
// same as the previous, but documented to be to a string item
typedef map_pointer<char> map_stringitem_t;
// we have only a small amount of flags for each item
typedef uint8_t map_flags_t;
typedef uint8_t map_number_t;
class pkgVersioningSystem;
class APT_PUBLIC pkgCache /*{{{*/
{
public:
// Cache element predeclarations
struct Header;
struct Group;
struct Package;
struct ReleaseFile;
struct PackageFile;
struct SourceVersion;
struct Version;
struct Description;
struct Provides;
struct Dependency;
struct DependencyData;
struct StringItem;
struct VerFile;
struct DescFile;
// Iterators
template<typename Str, typename Itr> class Iterator;
class GrpIterator;
class PkgIterator;
class VerIterator;
class SrcVerIterator;
class DescIterator;
class DepIterator;
class PrvIterator;
class RlsFileIterator;
class PkgFileIterator;
class VerFileIterator;
class DescFileIterator;
class Namespace;
// These are all the constants used in the cache structures
// WARNING - if you change these lists you must also edit
// the stringification in pkgcache.cc and also consider whether
// the cache file will become incompatible.
struct Dep
{
enum DepType {Depends=1,PreDepends=2,Suggests=3,Recommends=4,
Conflicts=5,Replaces=6,Obsoletes=7,DpkgBreaks=8,Enhances=9};
enum DepCompareOp {NoOp=0,LessEq=0x1,GreaterEq=0x2,Less=0x3,
Greater=0x4,Equals=0x5,NotEquals=0x6,
Or=0x10,
MultiArchImplicit=0x20,
ArchSpecific=0x40
};
};
struct State
{
enum VerPriority {Required=1,Important=2,Standard=3,Optional=4,Extra=5};
enum PkgSelectedState {Unknown=0,Install=1,Hold=2,DeInstall=3,Purge=4};
enum PkgInstState {Ok=0,ReInstReq=1,HoldInst=2,HoldReInstReq=3};
enum PkgCurrentState {NotInstalled=0,UnPacked=1,HalfConfigured=2,
HalfInstalled=4,ConfigFiles=5,Installed=6,
TriggersAwaited=7,TriggersPending=8};
};
struct Flag
{
enum PkgFlags {Auto=(1<<0),Essential=(1<<3),Important=(1<<4)};
enum PkgFFlags {
NotSource=(1<<0),
LocalSource=(1<<1),
NoPackages=(1<<2),
};
enum ReleaseFileFlags {
NotAutomatic=(1<<0),
ButAutomaticUpgrades=(1<<1),
};
enum ProvidesFlags {
MultiArchImplicit=pkgCache::Dep::MultiArchImplicit,
ArchSpecific=pkgCache::Dep::ArchSpecific
};
};
protected:
// Memory mapped cache file
std::string CacheFile;
MMap &Map;
map_id_t sHash(std::string_view S) const APT_PURE;
public:
// Pointers to the arrays of items
Header *HeaderP;
Group *GrpP;
Package *PkgP;
VerFile *VerFileP;
DescFile *DescFileP;
ReleaseFile *RlsFileP;
PackageFile *PkgFileP;
SourceVersion *SrcVerP; // reserved for SourceVersion objects
Version *VerP;
Description *DescP;
Provides *ProvideP;
Dependency *DepP;
DependencyData *DepDataP;
char *StrP;
void *reserved[13];
virtual bool ReMap(bool const &Errorchecks = true);
inline bool Sync() {return Map.Sync();}
inline MMap &GetMap() {return Map;}
inline void *DataEnd() {return ((unsigned char *)Map.Data()) + Map.Size();}
// String hashing function (512 range)
inline map_id_t Hash(std::string_view S) const {return sHash(S);}
APT_HIDDEN uint32_t CacheHash();
// Useful transformation things
static const char *Priority(unsigned char Priority);
static std::string_view Priority_NoL10n(unsigned char Prio);
// Accessors
GrpIterator FindGrp(std::string_view Name);
PkgIterator FindPkg(std::string_view Name);
PkgIterator FindPkg(std::string_view Name, std::string_view Arch);
std::string_view ViewString(map_stringitem_t idx) const
{
char *name = StrP + idx;
size_t len = *reinterpret_cast<const uint16_t *>(__builtin_assume_aligned(name - sizeof(uint16_t), sizeof(uint16_t)));
return {name, len};
}
constexpr Header &Head() noexcept {return *HeaderP;}
inline GrpIterator GrpBegin() noexcept;
constexpr GrpIterator GrpEnd() noexcept;
inline PkgIterator PkgBegin() noexcept;
constexpr PkgIterator PkgEnd() noexcept;
inline PkgFileIterator FileBegin() noexcept;
constexpr PkgFileIterator FileEnd() noexcept;
inline RlsFileIterator RlsFileBegin() noexcept;
constexpr RlsFileIterator RlsFileEnd() noexcept;
constexpr bool MultiArchCache() const noexcept { return MultiArchEnabled; }
constexpr char const * NativeArch() const noexcept;
// Make me a function
pkgVersioningSystem *VS;
// Converters
static const char *CompTypeDeb(unsigned char Comp) APT_PURE;
static const char *CompType(unsigned char Comp) APT_PURE;
static const char *DepType(unsigned char Dep);
static std::string_view DepType_NoL10n(unsigned char Dep);
pkgCache(MMap *Map,bool DoMap = true);
virtual ~pkgCache();
private:
void * const d;
bool MultiArchEnabled;
};
/*}}}*/
// Header structure /*{{{*/
struct pkgCache::Header
{
uint32_t Signature;
map_number_t MajorVersion;
map_number_t MinorVersion;
bool Dirty;
uint16_t HeaderSz;
map_number_t GroupSz;
map_number_t PackageSz;
map_number_t ReleaseFileSz;
map_number_t PackageFileSz;
map_number_t VersionSz;
map_number_t SourceVersionSz;
map_number_t DescriptionSz;
map_number_t DependencySz;
map_number_t DependencyDataSz;
map_number_t ProvidesSz;
map_number_t VerFileSz;
map_number_t DescFileSz;
map_id_t GroupCount;
map_id_t PackageCount;
map_id_t VersionCount;
map_id_t SourceVersionCount;
map_id_t DescriptionCount;
map_id_t DependsCount;
map_id_t DependsDataCount;
map_fileid_t ReleaseFileCount;
map_fileid_t PackageFileCount;
map_id_t VerFileCount;
map_id_t DescFileCount;
map_id_t ProvidesCount;
map_pointer<PackageFile> FileList;
map_pointer<ReleaseFile> RlsFileList;
map_stringitem_t VerSysName;
map_stringitem_t Architecture;
map_stringitem_t Architectures;
map_filesize_t MaxVerFileSize;
map_filesize_t MaxDescFileSize;
DynamicMMap::Pool Pools[2 * 13];
uint32_t HashTableSize;
uint32_t GetHashTableSize() const { return HashTableSize; }
void SetHashTableSize(unsigned int const sz) { HashTableSize = sz; }
map_stringitem_t GetArchitectures() const { return Architectures; }
void SetArchitectures(map_stringitem_t const idx) { Architectures = idx; }
#ifdef APT_COMPILING_APT
map_pointer<Group> * GrpHashTableP() const { return (map_pointer<Group>*) (this + 1); }
map_pointer<Package> * PkgHashTableP() const { return reinterpret_cast<map_pointer<Package> *>(GrpHashTableP() + GetHashTableSize()); }
#endif
map_filesize_small_t CacheFileSize;
bool CheckSizes(Header &Against) const APT_PURE;
Header();
};
/*}}}*/
// Group structure /*{{{*/
struct pkgCache::Group
{
map_stringitem_t Name;
// Linked List
map_pointer<Package> FirstPackage;
map_pointer<Package> LastPackage;
map_pointer<Group> Next;
map_id_t ID;
map_pointer<Version> VersionsInSource;
map_pointer<SourceVersion> SourceVersionList;
map_pointer<void> d;
};
/*}}}*/
// Package structure /*{{{*/
struct pkgCache::Package
{
map_stringitem_t Arch;
map_pointer<Version> VersionList;
map_pointer<Version> CurrentVer;
map_pointer<pkgCache::Group> Group;
// Linked list
map_pointer<Package> NextPackage;
map_pointer<Dependency> RevDepends;
map_pointer<Provides> ProvidesList;
// Install/Remove/Purge etc
map_number_t SelectedState; // What
map_number_t InstState; // Flags
map_number_t CurrentState; // State
map_id_t ID;
map_flags_t Flags;
map_pointer<void> d;
};
/*}}}*/
// Release File structure /*{{{*/
struct pkgCache::ReleaseFile
{
map_stringitem_t FileName;
map_stringitem_t Archive;
map_stringitem_t Codename;
map_stringitem_t Version;
map_stringitem_t Origin;
map_stringitem_t Label;
map_stringitem_t Site;
map_filesize_t Size;
time_t mtime;
map_flags_t Flags;
// Linked list
map_pointer<ReleaseFile> NextFile;
map_fileid_t ID;
map_pointer<void> d;
};
/*}}}*/
// Package File structure /*{{{*/
struct pkgCache::PackageFile
{
map_stringitem_t FileName;
map_pointer<ReleaseFile> Release;
map_stringitem_t Component;
map_stringitem_t Architecture;
map_stringitem_t IndexType;
map_filesize_t Size;
time_t mtime;
map_flags_t Flags;
// Linked list
map_pointer<PackageFile> NextFile;
map_fileid_t ID;
map_pointer<void> d;
};
/*}}}*/
// VerFile structure /*{{{*/
struct pkgCache::VerFile
{
map_pointer<PackageFile> File;
map_pointer<VerFile> NextFile;
map_filesize_t Offset; // File offset
};
/*}}}*/
// DescFile structure /*{{{*/
struct pkgCache::DescFile
{
map_pointer<PackageFile> File;
map_pointer<DescFile> NextFile;
map_filesize_t Offset; // File offset
};
/*}}}*/
// SourceVersion structure /*{{{*/
struct pkgCache::SourceVersion
{
map_id_t ID;
map_pointer<pkgCache::Group> Group;
map_stringitem_t VerStr;
map_pointer<Version> VersionList [[gnu::unavailable("not yet available")]];
map_pointer<SourceVersion> NextSourceVersion [[gnu::unavailable("not yet available")]];
map_pointer<void> d;
};
/*}}}*/
// Version structure /*{{{*/
struct pkgCache::Version
{
struct Extra;
map_stringitem_t VerStr;
map_stringitem_t Section;
map_pointer<pkgCache::SourceVersion> SourceVersion;
map_pointer<Version> NextInSourceVersion;
enum VerMultiArch { No = 0,
All = (1<<0),
Foreign = (1<<1),
Same = (1<<2),
Allowed = (1<<3),
AllForeign = All | Foreign,
AllAllowed = All | Allowed };
map_number_t MultiArch;
map_pointer<VerFile> FileList;
map_pointer<Version> NextVer;
map_pointer<Description> DescriptionList;
map_pointer<Dependency> DependsList;
map_pointer<Package> ParentPkg;
map_pointer<Provides> ProvidesList;
map_filesize_t Size; // These are the .deb size
map_filesize_t InstalledSize;
uint32_t Hash;
map_id_t ID;
map_number_t Priority;
map_pointer<Version> NextInSource;
map_pointer<Extra> d;
};
#ifdef APT_COMPILING_APT
struct pkgCache::Version::Extra
{
uint8_t PhasedUpdatePercentage;
map_stringitem_t ArchVariant;
};
#endif
/*}}}*/
// Description structure /*{{{*/
struct pkgCache::Description
{
map_stringitem_t language_code;
map_stringitem_t md5sum;
map_pointer<DescFile> FileList;
map_pointer<Description> NextDesc;
map_pointer<Package> ParentPkg;
map_id_t ID;
};
/*}}}*/
// Dependency structure /*{{{*/
struct pkgCache::DependencyData
{
map_stringitem_t Version;
map_pointer<pkgCache::Package> Package;
map_number_t Type;
map_flags_t CompareOp;
map_pointer<DependencyData> NextData;
};
struct pkgCache::Dependency
{
map_pointer<pkgCache::DependencyData> DependencyData;
map_pointer<Version> ParentVer;
map_pointer<Dependency> NextRevDepends;
map_pointer<Dependency> NextDepends;
map_id_t ID;
};
/*}}}*/
// Provides structure /*{{{*/
struct pkgCache::Provides
{
map_pointer<Package> ParentPkg;
map_pointer<pkgCache::Version> Version;
map_stringitem_t ProvideVersion;
map_flags_t Flags;
map_pointer<Provides> NextProvides;
map_pointer<Provides> NextPkgProv;
};
/*}}}*/
constexpr char const * pkgCache::NativeArch() const noexcept
{ return StrP + HeaderP->Architecture; }
#include <apt-pkg/cacheiterators.h>
inline pkgCache::GrpIterator pkgCache::GrpBegin() noexcept
{
return GrpIterator(*this);
}
constexpr pkgCache::GrpIterator pkgCache::GrpEnd() noexcept
{
return GrpIterator(*this, GrpP);}
inline pkgCache::PkgIterator pkgCache::PkgBegin() noexcept
{return PkgIterator(*this);}
constexpr pkgCache::PkgIterator pkgCache::PkgEnd() noexcept
{return PkgIterator(*this,PkgP);}
inline pkgCache::PkgFileIterator pkgCache::FileBegin() noexcept
{return PkgFileIterator(*this,PkgFileP + HeaderP->FileList);}
constexpr pkgCache::PkgFileIterator pkgCache::FileEnd() noexcept
{return PkgFileIterator(*this,PkgFileP);}
inline pkgCache::RlsFileIterator pkgCache::RlsFileBegin() noexcept
{return RlsFileIterator(*this,RlsFileP + HeaderP->RlsFileList);}
constexpr pkgCache::RlsFileIterator pkgCache::RlsFileEnd() noexcept
{return RlsFileIterator(*this,RlsFileP);}
// Oh I wish for Real Name Space Support
class pkgCache::Namespace /*{{{*/
{
public:
typedef pkgCache::GrpIterator GrpIterator;
typedef pkgCache::PkgIterator PkgIterator;
typedef pkgCache::VerIterator VerIterator;
typedef pkgCache::SrcVerIterator SrcVerIterator;
typedef pkgCache::DescIterator DescIterator;
typedef pkgCache::DepIterator DepIterator;
typedef pkgCache::PrvIterator PrvIterator;
typedef pkgCache::RlsFileIterator RlsFileIterator;
typedef pkgCache::PkgFileIterator PkgFileIterator;
typedef pkgCache::VerFileIterator VerFileIterator;
typedef pkgCache::Version Version;
typedef pkgCache::Description Description;
typedef pkgCache::Package Package;
typedef pkgCache::Header Header;
typedef pkgCache::Dep Dep;
typedef pkgCache::Flag Flag;
};
/*}}}*/
#undef __PKGLIB_IN_PKGCACHE_H
#endif
MMap
Definition mmap.h:45
map_pointer
Definition pkgcache.h:98
pkgCache::DepIterator
Definition cacheiterators.h:337
pkgCache::DescFileIterator
Definition cacheiterators.h:548
pkgCache::DescIterator
Definition cacheiterators.h:311
pkgCache::GrpIterator
Definition cacheiterators.h:106
pkgCache::Iterator
Definition cacheiterators.h:47
pkgCache::Namespace
Definition pkgcache.h:853
pkgCache::PkgFileIterator
Definition cacheiterators.h:496
pkgCache::PkgIterator
Definition cacheiterators.h:147
pkgCache::PrvIterator
Definition cacheiterators.h:423
pkgCache::RlsFileIterator
Definition cacheiterators.h:467
pkgCache::SrcVerIterator
Definition cacheiterators.h:194
pkgCache::VerFileIterator
Definition cacheiterators.h:530
pkgCache::VerIterator
Definition cacheiterators.h:218
pkgVersioningSystem
Definition version.h:27
DynamicMMap::Pool
Definition mmap.h:87
pkgCache::Dep
Definition pkgcache.h:166
pkgCache::Dep::DepCompareOp
DepCompareOp
available compare operators
Definition pkgcache.h:174
pkgCache::Dep::ArchSpecific
@ ArchSpecific
Definition pkgcache.h:178
pkgCache::Dep::Or
@ Or
Definition pkgcache.h:176
pkgCache::Dep::MultiArchImplicit
@ MultiArchImplicit
Definition pkgcache.h:177
pkgCache::DependencyData
information for a single dependency record
Definition pkgcache.h:765
pkgCache::DependencyData::CompareOp
map_flags_t CompareOp
comparison operator specified on the depends line
Definition pkgcache.h:779
pkgCache::DependencyData::Version
map_stringitem_t Version
string of the version the dependency is applied against
Definition pkgcache.h:767
pkgCache::DependencyData::Package
map_pointer< pkgCache::Package > Package
index of the package this depends applies to
Definition pkgcache.h:772
pkgCache::DependencyData::Type
map_number_t Type
Dependency type - Depends, Recommends, Conflicts, etc.
Definition pkgcache.h:775
pkgCache::Dependency
Definition pkgcache.h:784
pkgCache::Dependency::NextRevDepends
map_pointer< Dependency > NextRevDepends
next reverse dependency of this package
Definition pkgcache.h:789
pkgCache::Dependency::NextDepends
map_pointer< Dependency > NextDepends
next dependency of this version
Definition pkgcache.h:791
pkgCache::Dependency::ParentVer
map_pointer< Version > ParentVer
version of the package which has the depends
Definition pkgcache.h:787
pkgCache::Dependency::ID
map_id_t ID
unique sequel ID
Definition pkgcache.h:794
pkgCache::DescFile
associates a description with a Translation file
Definition pkgcache.h:615
pkgCache::DescFile::NextFile
map_pointer< DescFile > NextFile
next step in the linked list
Definition pkgcache.h:619
pkgCache::DescFile::Offset
map_filesize_t Offset
position in the file
Definition pkgcache.h:621
pkgCache::DescFile::File
map_pointer< PackageFile > File
index of the file that this description was found in
Definition pkgcache.h:617
pkgCache::Description
datamember of a linked list of available description for a version
Definition pkgcache.h:734
pkgCache::Description::NextDesc
map_pointer< Description > NextDesc
next translation for this description
Definition pkgcache.h:749
pkgCache::Description::ParentPkg
map_pointer< Package > ParentPkg
the text is a description of this package
Definition pkgcache.h:751
pkgCache::Description::md5sum
map_stringitem_t md5sum
MD5sum of the original description.
Definition pkgcache.h:744
pkgCache::Description::ID
map_id_t ID
unique sequel ID
Definition pkgcache.h:754
pkgCache::Description::FileList
map_pointer< DescFile > FileList
Definition pkgcache.h:747
pkgCache::Description::language_code
map_stringitem_t language_code
Language code of this description (translation).
Definition pkgcache.h:739
pkgCache::Flag
Definition pkgcache.h:196
pkgCache::Flag::ProvidesFlags
ProvidesFlags
Definition pkgcache.h:207
pkgCache::Flag::ArchSpecific
@ ArchSpecific
Definition pkgcache.h:209
pkgCache::Flag::MultiArchImplicit
@ MultiArchImplicit
Definition pkgcache.h:208
pkgCache::Flag::ReleaseFileFlags
ReleaseFileFlags
Definition pkgcache.h:203
pkgCache::Flag::NotAutomatic
@ NotAutomatic
Definition pkgcache.h:204
pkgCache::Flag::ButAutomaticUpgrades
@ ButAutomaticUpgrades
Definition pkgcache.h:205
pkgCache::Flag::PkgFFlags
PkgFFlags
Definition pkgcache.h:198
pkgCache::Flag::NotSource
@ NotSource
Definition pkgcache.h:199
pkgCache::Flag::NoPackages
@ NoPackages
Definition pkgcache.h:201
pkgCache::Flag::LocalSource
@ LocalSource
Definition pkgcache.h:200
pkgCache::Group
groups architecture depending packages together
Definition pkgcache.h:422
pkgCache::Group::Name
map_stringitem_t Name
Name of the group.
Definition pkgcache.h:424
pkgCache::Group::Next
map_pointer< Group > Next
Link to the next Group.
Definition pkgcache.h:433
pkgCache::Group::VersionsInSource
map_pointer< Version > VersionsInSource
List of binary produces by source package with this name.
Definition pkgcache.h:438
pkgCache::Group::FirstPackage
map_pointer< Package > FirstPackage
Link to the first package which belongs to the group.
Definition pkgcache.h:428
pkgCache::Group::LastPackage
map_pointer< Package > LastPackage
Link to the last package which belongs to the group.
Definition pkgcache.h:430
pkgCache::Group::d
map_pointer< void > d
Private pointer.
Definition pkgcache.h:444
pkgCache::Group::ID
map_id_t ID
unique sequel ID
Definition pkgcache.h:435
pkgCache::Group::SourceVersionList
map_pointer< SourceVersion > SourceVersionList
SourceVersionList.
Definition pkgcache.h:441
pkgCache::Header
Definition pkgcache.h:297
pkgCache::Header::HashTableSize
uint32_t HashTableSize
hash tables providing rapid group/package name lookup
Definition pkgcache.h:392
pkgCache::Header::MajorVersion
map_number_t MajorVersion
Definition pkgcache.h:305
pkgCache::Header::Signature
uint32_t Signature
Signature information.
Definition pkgcache.h:303
pkgCache::Header::CacheFileSize
map_filesize_small_t CacheFileSize
Hash of the file (TODO: Rename).
Definition pkgcache.h:404
pkgCache::Header::HeaderSz
uint16_t HeaderSz
Size of structure values.
Definition pkgcache.h:321
pkgCache::Header::VerSysName
map_stringitem_t VerSysName
String representing the version system used.
Definition pkgcache.h:362
pkgCache::Header::MaxVerFileSize
map_filesize_t MaxVerFileSize
The maximum size of a raw entry from the original Package file.
Definition pkgcache.h:368
pkgCache::Header::MaxDescFileSize
map_filesize_t MaxDescFileSize
The maximum size of a raw entry from the original Translation file.
Definition pkgcache.h:370
pkgCache::Header::RlsFileList
map_pointer< ReleaseFile > RlsFileList
index of the first ReleaseFile structure
Definition pkgcache.h:359
pkgCache::Header::Pools
DynamicMMap::Pool Pools[2 *13]
The Pool structures manage the allocation pools that the generator uses.
Definition pkgcache.h:380
pkgCache::Header::Architectures
map_stringitem_t Architectures
all architectures the cache was built against
Definition pkgcache.h:366
pkgCache::Header::Architecture
map_stringitem_t Architecture
native architecture the cache was built against
Definition pkgcache.h:364
pkgCache::Header::GroupCount
map_id_t GroupCount
Structure counts.
Definition pkgcache.h:340
pkgCache::Header::FileList
map_pointer< PackageFile > FileList
index of the first PackageFile structure
Definition pkgcache.h:357
pkgCache::Header::Dirty
bool Dirty
indicates if the cache should be erased
Definition pkgcache.h:312
pkgCache::PackageFile
stores information about the files used to generate the cache
Definition pkgcache.h:562
pkgCache::PackageFile::NextFile
map_pointer< PackageFile > NextFile
Link to the next PackageFile in the Cache.
Definition pkgcache.h:589
pkgCache::PackageFile::ID
map_fileid_t ID
unique sequel ID
Definition pkgcache.h:591
pkgCache::PackageFile::mtime
time_t mtime
Modification time for the file.
Definition pkgcache.h:582
pkgCache::PackageFile::FileName
map_stringitem_t FileName
physical disk file that this PackageFile represents
Definition pkgcache.h:564
pkgCache::PackageFile::Flags
map_flags_t Flags
Definition pkgcache.h:585
pkgCache::PackageFile::IndexType
map_stringitem_t IndexType
indicates what sort of index file this is
Definition pkgcache.h:574
pkgCache::PackageFile::Size
map_filesize_t Size
Size of the file.
Definition pkgcache.h:580
pkgCache::PackageFile::d
map_pointer< void > d
Private pointer.
Definition pkgcache.h:594
pkgCache::PackageFile::Release
map_pointer< ReleaseFile > Release
the release information
Definition pkgcache.h:566
pkgCache::Package
contains information for a single unique package
Definition pkgcache.h:460
pkgCache::Package::RevDepends
map_pointer< Dependency > RevDepends
List of all dependencies on this package.
Definition pkgcache.h:482
pkgCache::Package::CurrentState
map_number_t CurrentState
indicates if the package is installed
Definition pkgcache.h:496
pkgCache::Package::Arch
map_stringitem_t Arch
Architecture of the package.
Definition pkgcache.h:462
pkgCache::Package::VersionList
map_pointer< Version > VersionList
Base of a singly linked list of versions.
Definition pkgcache.h:472
pkgCache::Package::InstState
map_number_t InstState
installation state of the package
Definition pkgcache.h:494
pkgCache::Package::Group
map_pointer< pkgCache::Group > Group
index of the group this package belongs to
Definition pkgcache.h:476
pkgCache::Package::CurrentVer
map_pointer< Version > CurrentVer
index to the installed version
Definition pkgcache.h:474
pkgCache::Package::Flags
map_flags_t Flags
some useful indicators of the package's state
Definition pkgcache.h:506
pkgCache::Package::NextPackage
map_pointer< Package > NextPackage
Link to the next package in the same bucket.
Definition pkgcache.h:480
pkgCache::Package::SelectedState
map_number_t SelectedState
state that the user wishes the package to be in
Definition pkgcache.h:488
pkgCache::Package::d
map_pointer< void > d
Private pointer.
Definition pkgcache.h:509
pkgCache::Package::ProvidesList
map_pointer< Provides > ProvidesList
List of all "packages" this package provide.
Definition pkgcache.h:484
pkgCache::Package::ID
map_id_t ID
unique sequel ID
Definition pkgcache.h:504
pkgCache::Provides
handles virtual packages
Definition pkgcache.h:807
pkgCache::Provides::NextPkgProv
map_pointer< Provides > NextPkgProv
next provides (based of version)
Definition pkgcache.h:821
pkgCache::Provides::Version
map_pointer< pkgCache::Version > Version
index of the version this provide line applies to
Definition pkgcache.h:811
pkgCache::Provides::ParentPkg
map_pointer< Package > ParentPkg
index of the package providing this
Definition pkgcache.h:809
pkgCache::Provides::NextProvides
map_pointer< Provides > NextProvides
next provides (based of package)
Definition pkgcache.h:819
pkgCache::Provides::ProvideVersion
map_stringitem_t ProvideVersion
version in the provides line (if any)
Definition pkgcache.h:816
pkgCache::ReleaseFile
stores information about the release files used to generate the cache
Definition pkgcache.h:518
pkgCache::ReleaseFile::Archive
map_stringitem_t Archive
the release information
Definition pkgcache.h:525
pkgCache::ReleaseFile::ID
map_fileid_t ID
unique sequel ID
Definition pkgcache.h:549
pkgCache::ReleaseFile::Site
map_stringitem_t Site
The site the index file was fetched from.
Definition pkgcache.h:531
pkgCache::ReleaseFile::NextFile
map_pointer< ReleaseFile > NextFile
Link to the next ReleaseFile in the Cache.
Definition pkgcache.h:547
pkgCache::ReleaseFile::mtime
time_t mtime
Modification time for the file.
Definition pkgcache.h:540
pkgCache::ReleaseFile::FileName
map_stringitem_t FileName
physical disk file that this ReleaseFile represents
Definition pkgcache.h:520
pkgCache::ReleaseFile::Flags
map_flags_t Flags
Definition pkgcache.h:543
pkgCache::ReleaseFile::Size
map_filesize_t Size
Size of the file.
Definition pkgcache.h:538
pkgCache::ReleaseFile::d
map_pointer< void > d
Private pointer.
Definition pkgcache.h:552
pkgCache::SourceVersion
information for a single version of a source package
Definition pkgcache.h:631
pkgCache::SourceVersion::VerStr
map_stringitem_t VerStr
complete version string
Definition pkgcache.h:637
pkgCache::SourceVersion::Group
map_pointer< pkgCache::Group > Group
Group the source package belongs too.
Definition pkgcache.h:635
pkgCache::SourceVersion::d
map_pointer< void > d
Private pointer.
Definition pkgcache.h:642
pkgCache::SourceVersion::ID
map_id_t ID
unique sequel ID
Definition pkgcache.h:633
pkgCache::State
Definition pkgcache.h:183
pkgCache::State::VerPriority
VerPriority
priority of a package version
Definition pkgcache.h:187
pkgCache::VerFile
associates a version with a PackageFile
Definition pkgcache.h:603
pkgCache::VerFile::NextFile
map_pointer< VerFile > NextFile
next step in the linked list
Definition pkgcache.h:607
pkgCache::VerFile::Offset
map_filesize_t Offset
position in the package file
Definition pkgcache.h:609
pkgCache::VerFile::File
map_pointer< PackageFile > File
index of the package file that this version was found in
Definition pkgcache.h:605
pkgCache::Version
information for a single version of a package
Definition pkgcache.h:652
pkgCache::Version::MultiArch
map_number_t MultiArch
stores the MultiArch capabilities of this version
Definition pkgcache.h:678
pkgCache::Version::NextInSourceVersion
map_pointer< Version > NextInSourceVersion
next version in the source package (might be different binary)
Definition pkgcache.h:663
pkgCache::Version::VerStr
map_stringitem_t VerStr
complete version string
Definition pkgcache.h:656
pkgCache::Version::Priority
map_number_t Priority
parsed priority value
Definition pkgcache.h:714
pkgCache::Version::NextVer
map_pointer< Version > NextVer
next (lower or equal) version in the linked list
Definition pkgcache.h:688
pkgCache::Version::Section
map_stringitem_t Section
section this version is filled in
Definition pkgcache.h:658
pkgCache::Version::Hash
uint32_t Hash
characteristic value representing this version
Definition pkgcache.h:710
pkgCache::Version::InstalledSize
map_filesize_t InstalledSize
uncompressed size for this version
Definition pkgcache.h:705
pkgCache::Version::VerMultiArch
VerMultiArch
Multi-Arch capabilities of a package version.
Definition pkgcache.h:666
pkgCache::Version::Same
@ Same
Definition pkgcache.h:669
pkgCache::Version::Foreign
@ Foreign
Definition pkgcache.h:668
pkgCache::Version::Allowed
@ Allowed
Definition pkgcache.h:670
pkgCache::Version::All
@ All
Definition pkgcache.h:667
pkgCache::Version::No
@ No
Definition pkgcache.h:666
pkgCache::Version::Size
map_filesize_t Size
archive size for this version
Definition pkgcache.h:703
pkgCache::Version::ParentPkg
map_pointer< Package > ParentPkg
links to the owning package
Definition pkgcache.h:696
pkgCache::Version::NextInSource
map_pointer< Version > NextInSource
next version in the source package (might be different binary)
Definition pkgcache.h:716
pkgCache::Version::DependsList
map_pointer< Dependency > DependsList
base of the dependency list
Definition pkgcache.h:692
pkgCache::Version::ProvidesList
map_pointer< Provides > ProvidesList
list of pkgCache::Provides
Definition pkgcache.h:698
pkgCache::Version::ID
map_id_t ID
unique sequel ID
Definition pkgcache.h:712
pkgCache::Version::d
map_pointer< Extra > d
Private pointer.
Definition pkgcache.h:719
pkgCache::Version::FileList
map_pointer< VerFile > FileList
references all the PackageFile's that this version came from
Definition pkgcache.h:686
pkgCache::Version::DescriptionList
map_pointer< Description > DescriptionList
next description in the linked list
Definition pkgcache.h:690
pkgCache::Version::SourceVersion
map_pointer< pkgCache::SourceVersion > SourceVersion
the source version object
Definition pkgcache.h:661