apt 2.9.25 commandline package manager

pkgcache.h
Go to the documentation of this file.
1// -*- mode: cpp; mode: fold -*-
2// Description /*{{{*/
73 /*}}}*/
74#ifndef PKGLIB_PKGCACHE_H
75#define PKGLIB_PKGCACHE_H
76#define __PKGLIB_IN_PKGCACHE_H
77#include <apt-pkg/macros.h>
78#include <apt-pkg/mmap.h>
79
80#include <cstddef> // required for nullptr_t
81#include <cstdint>
82#include <ctime>
83#include <string>
84
85#include <apt-pkg/string_view.h>
86
87
88// size of (potentially big) files like debs or the install size of them
89 typedef uint64_t map_filesize_t;
90// storing file sizes of indexes, which are way below 4 GB for now
91 typedef uint32_t map_filesize_small_t;
92// each package/group/dependency gets an id
93 typedef uint32_t map_id_t;
94// some files get an id, too, but in far less absolute numbers
95 typedef uint16_t map_fileid_t;
96
97// relative pointer from cache start
98 template <typename T> class map_pointer {
99 uint32_t val;
100 public:
101 map_pointer() noexcept : val(0) {}
102 map_pointer(std::nullptr_t) noexcept : val(0) {}
103 explicit map_pointer(uint32_t n) noexcept : val(n) {}
104 explicit operator uint32_t() noexcept { return val; }
105 explicit operator bool() noexcept { return val != 0; }
106};
107
108 template<typename T> inline T *operator +(T *p, map_pointer<T> m) { return p + uint32_t(m); }
109 template<typename T> inline bool operator ==(map_pointer<T> u, map_pointer<T> m) { return uint32_t(u) == uint32_t(m); }
110 template<typename T> inline bool operator !=(map_pointer<T> u, map_pointer<T> m) { return uint32_t(u) != uint32_t(m); }
111 template<typename T> inline bool operator <(map_pointer<T> u, map_pointer<T> m) { return uint32_t(u) < uint32_t(m); }
112 template<typename T> inline bool operator >(map_pointer<T> u, map_pointer<T> m) { return uint32_t(u) > uint32_t(m); }
113 template<typename T> inline uint32_t operator -(map_pointer<T> u, map_pointer<T> m) { return uint32_t(u) - uint32_t(m); }
114 template<typename T> bool operator ==(map_pointer<T> m, std::nullptr_t) { return uint32_t(m) == 0; }
115 template<typename T> bool operator !=(map_pointer<T> m, std::nullptr_t) { return uint32_t(m) != 0; }
116
117// same as the previous, but documented to be to a string item
118 typedef map_pointer<char> map_stringitem_t;
119
120// we have only a small amount of flags for each item
121 typedef uint8_t map_flags_t;
122 typedef uint8_t map_number_t;
123
124 class pkgVersioningSystem;
125 class APT_PUBLIC pkgCache /*{{{*/
126{
127 public:
128 // Cache element predeclarations
129 struct Header;
130 struct Group;
131 struct Package;
132 struct ReleaseFile;
133 struct PackageFile;
134 struct Version;
135 struct Description;
136 struct Provides;
137 struct Dependency;
138 struct DependencyData;
139 struct StringItem;
140 struct VerFile;
141 struct DescFile;
142
143 // Iterators
144 template<typename Str, typename Itr> class Iterator;
145 class GrpIterator;
146 class PkgIterator;
147 class VerIterator;
148 class DescIterator;
149 class DepIterator;
150 class PrvIterator;
151 class RlsFileIterator;
152 class PkgFileIterator;
153 class VerFileIterator;
154 class DescFileIterator;
155
156 class Namespace;
157
158 // These are all the constants used in the cache structures
159
160 // WARNING - if you change these lists you must also edit
161 // the stringification in pkgcache.cc and also consider whether
162 // the cache file will become incompatible.
163 struct Dep
164 {
165 enum DepType {Depends=1,PreDepends=2,Suggests=3,Recommends=4,
166 Conflicts=5,Replaces=6,Obsoletes=7,DpkgBreaks=8,Enhances=9};
172 enum DepCompareOp {NoOp=0,LessEq=0x1,GreaterEq=0x2,Less=0x3,
173 Greater=0x4,Equals=0x5,NotEquals=0x6,
174 Or=0x10,
175 MultiArchImplicit=0x20,
176 ArchSpecific=0x40
177 };
178 };
179
180 struct State
181 {
185 enum VerPriority {Required=1,Important=2,Standard=3,Optional=4,Extra=5};
186 enum PkgSelectedState {Unknown=0,Install=1,Hold=2,DeInstall=3,Purge=4};
187 enum PkgInstState {Ok=0,ReInstReq=1,HoldInst=2,HoldReInstReq=3};
188 enum PkgCurrentState {NotInstalled=0,UnPacked=1,HalfConfigured=2,
189 HalfInstalled=4,ConfigFiles=5,Installed=6,
190 TriggersAwaited=7,TriggersPending=8};
191 };
192
193 struct Flag
194 {
195 enum PkgFlags {Auto=(1<<0),Essential=(1<<3),Important=(1<<4)};
196 enum PkgFFlags {
197 NotSource=(1<<0),
198 LocalSource=(1<<1),
199 NoPackages=(1<<2),
200 };
201 enum ReleaseFileFlags {
202 NotAutomatic=(1<<0),
203 ButAutomaticUpgrades=(1<<1),
204 };
205 enum ProvidesFlags {
206 MultiArchImplicit=pkgCache::Dep::MultiArchImplicit,
207 ArchSpecific=pkgCache::Dep::ArchSpecific
208 };
209 };
210
211 protected:
212
213 // Memory mapped cache file
214 std::string CacheFile;
215 MMap &Map;
216 map_id_t sHash(APT::StringView S) const APT_PURE;
217
218 public:
219
220 // Pointers to the arrays of items
221 Header *HeaderP;
222 Group *GrpP;
223 Package *PkgP;
224 VerFile *VerFileP;
225 DescFile *DescFileP;
226 ReleaseFile *RlsFileP;
227 PackageFile *PkgFileP;
228 Version *VerP;
229 Description *DescP;
230 Provides *ProvideP;
231 Dependency *DepP;
232 DependencyData *DepDataP;
233 char *StrP;
234 void *reserved[12];
235
236 virtual bool ReMap(bool const &Errorchecks = true);
237 inline bool Sync() {return Map.Sync();}
238 inline MMap &GetMap() {return Map;}
239 inline void *DataEnd() {return ((unsigned char *)Map.Data()) + Map.Size();}
240
241 // String hashing function (512 range)
242 inline map_id_t Hash(APT::StringView S) const {return sHash(S);}
243
244 APT_HIDDEN uint32_t CacheHash();
245
246 // Useful transformation things
247 static const char *Priority(unsigned char Priority);
248 static std::string_view Priority_NoL10n(unsigned char Prio);
249
250 // Accessors
251 GrpIterator FindGrp(APT::StringView Name);
252 PkgIterator FindPkg(APT::StringView Name);
253 PkgIterator FindPkg(APT::StringView Name, APT::StringView Arch);
254
255 APT::StringView ViewString(map_stringitem_t idx) const
256 {
257 char *name = StrP + idx;
258 uint16_t len = *reinterpret_cast<const uint16_t*>(name - sizeof(uint16_t));
259 return APT::StringView(name, len);
260 }
261
262 Header &Head() {return *HeaderP;}
263 inline GrpIterator GrpBegin();
264 inline GrpIterator GrpEnd();
265 inline PkgIterator PkgBegin();
266 inline PkgIterator PkgEnd();
267 inline PkgFileIterator FileBegin();
268 inline PkgFileIterator FileEnd();
269 inline RlsFileIterator RlsFileBegin();
270 inline RlsFileIterator RlsFileEnd();
271
272 inline bool MultiArchCache() const { return MultiArchEnabled; }
273 inline char const * NativeArch();
274
275 // Make me a function
276 pkgVersioningSystem *VS;
277
278 // Converters
279 static const char *CompTypeDeb(unsigned char Comp) APT_PURE;
280 static const char *CompType(unsigned char Comp) APT_PURE;
281 static const char *DepType(unsigned char Dep);
282 static std::string_view DepType_NoL10n(unsigned char Dep);
283
284 pkgCache(MMap *Map,bool DoMap = true);
285 virtual ~pkgCache();
286
287 private:
288 void * const d;
289 bool MultiArchEnabled;
290};
291 /*}}}*/
292// Header structure /*{{{*/
293 struct pkgCache::Header
294{
300 uint32_t Signature;
302 map_number_t MajorVersion;
303 map_number_t MinorVersion;
309 bool Dirty;
310
318 uint16_t HeaderSz;
319 map_number_t GroupSz;
320 map_number_t PackageSz;
321 map_number_t ReleaseFileSz;
322 map_number_t PackageFileSz;
323 map_number_t VersionSz;
324 map_number_t DescriptionSz;
325 map_number_t DependencySz;
326 map_number_t DependencyDataSz;
327 map_number_t ProvidesSz;
328 map_number_t VerFileSz;
329 map_number_t DescFileSz;
330
336 map_id_t GroupCount;
337 map_id_t PackageCount;
338 map_id_t VersionCount;
339 map_id_t DescriptionCount;
340 map_id_t DependsCount;
341 map_id_t DependsDataCount;
342 map_fileid_t ReleaseFileCount;
343 map_fileid_t PackageFileCount;
344 map_fileid_t VerFileCount;
345 map_fileid_t DescFileCount;
346 map_id_t ProvidesCount;
347
352 map_pointer<PackageFile> FileList;
354 map_pointer<ReleaseFile> RlsFileList;
355
357 map_stringitem_t VerSysName;
359 map_stringitem_t Architecture;
361 map_stringitem_t Architectures;
363 map_filesize_t MaxVerFileSize;
365 map_filesize_t MaxDescFileSize;
366
375 DynamicMMap::Pool Pools[2 * 12];
376
387 uint32_t HashTableSize;
388 uint32_t GetHashTableSize() const { return HashTableSize; }
389 void SetHashTableSize(unsigned int const sz) { HashTableSize = sz; }
390 map_stringitem_t GetArchitectures() const { return Architectures; }
391 void SetArchitectures(map_stringitem_t const idx) { Architectures = idx; }
392
393#ifdef APT_COMPILING_APT
394 map_pointer<Group> * GrpHashTableP() const { return (map_pointer<Group>*) (this + 1); }
395 map_pointer<Package> * PkgHashTableP() const { return reinterpret_cast<map_pointer<Package> *>(GrpHashTableP() + GetHashTableSize()); }
396#endif
397
399 map_filesize_small_t CacheFileSize;
400
401 bool CheckSizes(Header &Against) const APT_PURE;
402 Header();
403};
404 /*}}}*/
405// Group structure /*{{{*/
416 struct pkgCache::Group
417{
419 map_stringitem_t Name;
420
421 // Linked List
423 map_pointer<Package> FirstPackage;
425 map_pointer<Package> LastPackage;
426
428 map_pointer<Group> Next;
430 map_id_t ID;
431
433 map_pointer<Version> VersionsInSource;
434
436 map_pointer<void> d;
437};
438 /*}}}*/
439// Package structure /*{{{*/
451 struct pkgCache::Package
452{
454 map_stringitem_t Arch;
464 map_pointer<Version> VersionList;
466 map_pointer<Version> CurrentVer;
468 map_pointer<pkgCache::Group> Group;
469
470 // Linked list
472 map_pointer<Package> NextPackage;
474 map_pointer<Dependency> RevDepends;
476 map_pointer<Provides> ProvidesList;
477
478 // Install/Remove/Purge etc
480 map_number_t SelectedState; // What
486 map_number_t InstState; // Flags
488 map_number_t CurrentState; // State
489
496 map_id_t ID;
498 map_flags_t Flags;
499
501 map_pointer<void> d;
502};
503 /*}}}*/
504// Release File structure /*{{{*/
509 struct pkgCache::ReleaseFile
510{
512 map_stringitem_t FileName;
517 map_stringitem_t Archive;
518 map_stringitem_t Codename;
519 map_stringitem_t Version;
520 map_stringitem_t Origin;
521 map_stringitem_t Label;
523 map_stringitem_t Site;
524
530 map_filesize_t Size;
532 time_t mtime;
533
535 map_flags_t Flags;
536
537 // Linked list
539 map_pointer<ReleaseFile> NextFile;
541 map_fileid_t ID;
542
544 map_pointer<void> d;
545};
546 /*}}}*/
547// Package File structure /*{{{*/
553 struct pkgCache::PackageFile
554{
556 map_stringitem_t FileName;
558 map_pointer<ReleaseFile> Release;
559
560 map_stringitem_t Component;
561 map_stringitem_t Architecture;
562
566 map_stringitem_t IndexType;
572 map_filesize_t Size;
574 time_t mtime;
575
577 map_flags_t Flags;
578
579 // Linked list
581 map_pointer<PackageFile> NextFile;
583 map_fileid_t ID;
584
586 map_pointer<void> d;
587};
588 /*}}}*/
589// VerFile structure /*{{{*/
594 struct pkgCache::VerFile
595{
597 map_pointer<PackageFile> File;
599 map_pointer<VerFile> NextFile;
601 map_filesize_t Offset; // File offset
603 map_filesize_t Size;
604};
605 /*}}}*/
606// DescFile structure /*{{{*/
608 struct pkgCache::DescFile
609{
611 map_pointer<PackageFile> File;
613 map_pointer<DescFile> NextFile;
615 map_filesize_t Offset; // File offset
617 map_filesize_t Size;
618};
619 /*}}}*/
620// Version structure /*{{{*/
626 struct pkgCache::Version
627{
628 struct Extra;
629
631 map_stringitem_t VerStr;
633 map_stringitem_t Section;
636 map_stringitem_t SourcePkgName;
639 map_stringitem_t SourceVerStr;
640
642 enum VerMultiArch { No = 0,
643 All = (1<<0),
644 Foreign = (1<<1),
645 Same = (1<<2),
646 Allowed = (1<<3),
647 AllForeign = All | Foreign,
648 AllAllowed = All | Allowed };
649
654 map_number_t MultiArch;
655
662 map_pointer<VerFile> FileList;
664 map_pointer<Version> NextVer;
666 map_pointer<Description> DescriptionList;
668 map_pointer<Dependency> DependsList;
672 map_pointer<Package> ParentPkg;
674 map_pointer<Provides> ProvidesList;
675
679 map_filesize_t Size; // These are the .deb size
681 map_filesize_t InstalledSize;
686 uint32_t Hash;
688 map_id_t ID;
690 map_number_t Priority;
692 map_pointer<Version> NextInSource;
693
695 map_pointer<Extra> d;
696};
697
698#ifdef APT_COMPILING_APT
700 struct pkgCache::Version::Extra
701{
702 uint8_t PhasedUpdatePercentage;
703};
704#endif
705 /*}}}*/
706// Description structure /*{{{*/
708 struct pkgCache::Description
709{
714 map_stringitem_t language_code;
719 map_stringitem_t md5sum;
720
722 map_pointer<DescFile> FileList;
724 map_pointer<Description> NextDesc;
726 map_pointer<Package> ParentPkg;
727
729 map_id_t ID;
730};
731 /*}}}*/
732// Dependency structure /*{{{*/
739 struct pkgCache::DependencyData
740{
742 map_stringitem_t Version;
747 map_pointer<pkgCache::Package> Package;
748
750 map_number_t Type;
754 map_flags_t CompareOp;
755
756 map_pointer<DependencyData> NextData;
757};
758 struct pkgCache::Dependency
759{
760 map_pointer<pkgCache::DependencyData> DependencyData;
762 map_pointer<Version> ParentVer;
764 map_pointer<Dependency> NextRevDepends;
766 map_pointer<Dependency> NextDepends;
767
769 map_id_t ID;
770};
771 /*}}}*/
772// Provides structure /*{{{*/
781 struct pkgCache::Provides
782{
784 map_pointer<Package> ParentPkg;
786 map_pointer<pkgCache::Version> Version;
791 map_stringitem_t ProvideVersion;
792 map_flags_t Flags;
794 map_pointer<Provides> NextProvides;
796 map_pointer<Provides> NextPkgProv;
797};
798 /*}}}*/
799
800 inline char const * pkgCache::NativeArch()
801 { return StrP + HeaderP->Architecture; }
802
803#include <apt-pkg/cacheiterators.h>
804
805 inline pkgCache::GrpIterator pkgCache::GrpBegin()
806 {
807 return GrpIterator(*this);
808 }
809 inline pkgCache::GrpIterator pkgCache::GrpEnd()
810 {
811 return GrpIterator(*this, GrpP);}
812 inline pkgCache::PkgIterator pkgCache::PkgBegin()
813 {return PkgIterator(*this);}
814 inline pkgCache::PkgIterator pkgCache::PkgEnd()
815 {return PkgIterator(*this,PkgP);}
816 inline pkgCache::PkgFileIterator pkgCache::FileBegin()
817 {return PkgFileIterator(*this,PkgFileP + HeaderP->FileList);}
818 inline pkgCache::PkgFileIterator pkgCache::FileEnd()
819 {return PkgFileIterator(*this,PkgFileP);}
820 inline pkgCache::RlsFileIterator pkgCache::RlsFileBegin()
821 {return RlsFileIterator(*this,RlsFileP + HeaderP->RlsFileList);}
822 inline pkgCache::RlsFileIterator pkgCache::RlsFileEnd()
823 {return RlsFileIterator(*this,RlsFileP);}
824
825
826// Oh I wish for Real Name Space Support
827 class pkgCache::Namespace /*{{{*/
828{
829 public:
830 typedef pkgCache::GrpIterator GrpIterator;
831 typedef pkgCache::PkgIterator PkgIterator;
832 typedef pkgCache::VerIterator VerIterator;
833 typedef pkgCache::DescIterator DescIterator;
834 typedef pkgCache::DepIterator DepIterator;
835 typedef pkgCache::PrvIterator PrvIterator;
836 typedef pkgCache::RlsFileIterator RlsFileIterator;
837 typedef pkgCache::PkgFileIterator PkgFileIterator;
838 typedef pkgCache::VerFileIterator VerFileIterator;
839 typedef pkgCache::Version Version;
840 typedef pkgCache::Description Description;
841 typedef pkgCache::Package Package;
842 typedef pkgCache::Header Header;
843 typedef pkgCache::Dep Dep;
844 typedef pkgCache::Flag Flag;
845};
846 /*}}}*/
847#undef __PKGLIB_IN_PKGCACHE_H
848#endif
APT::StringView
Simple subset of std::string_view from C++17.
Definition string_view.h:35
MMap
Definition mmap.h:45
map_pointer
Definition pkgcache.h:98
pkgCache::DepIterator
Definition cacheiterators.h:299
pkgCache::DescFileIterator
Definition cacheiterators.h:506
pkgCache::DescIterator
Definition cacheiterators.h:273
pkgCache::GrpIterator
Definition cacheiterators.h:106
pkgCache::Iterator
Definition cacheiterators.h:47
pkgCache::Namespace
Definition pkgcache.h:828
pkgCache::PkgFileIterator
Definition cacheiterators.h:454
pkgCache::PkgIterator
Definition cacheiterators.h:147
pkgCache::PrvIterator
Definition cacheiterators.h:384
pkgCache::RlsFileIterator
Definition cacheiterators.h:425
pkgCache::VerFileIterator
Definition cacheiterators.h:488
pkgCache::VerIterator
Definition cacheiterators.h:193
pkgVersioningSystem
Definition version.h:27
DynamicMMap::Pool
Definition mmap.h:87
pkgCache::Dep
Definition pkgcache.h:164
pkgCache::Dep::DepCompareOp
DepCompareOp
available compare operators
Definition pkgcache.h:172
pkgCache::Dep::ArchSpecific
@ ArchSpecific
Definition pkgcache.h:176
pkgCache::Dep::Or
@ Or
Definition pkgcache.h:174
pkgCache::Dep::MultiArchImplicit
@ MultiArchImplicit
Definition pkgcache.h:175
pkgCache::DependencyData
information for a single dependency record
Definition pkgcache.h:740
pkgCache::DependencyData::CompareOp
map_flags_t CompareOp
comparison operator specified on the depends line
Definition pkgcache.h:754
pkgCache::DependencyData::Version
map_stringitem_t Version
string of the version the dependency is applied against
Definition pkgcache.h:742
pkgCache::DependencyData::Package
map_pointer< pkgCache::Package > Package
index of the package this depends applies to
Definition pkgcache.h:747
pkgCache::DependencyData::Type
map_number_t Type
Dependency type - Depends, Recommends, Conflicts, etc.
Definition pkgcache.h:750
pkgCache::Dependency
Definition pkgcache.h:759
pkgCache::Dependency::NextRevDepends
map_pointer< Dependency > NextRevDepends
next reverse dependency of this package
Definition pkgcache.h:764
pkgCache::Dependency::NextDepends
map_pointer< Dependency > NextDepends
next dependency of this version
Definition pkgcache.h:766
pkgCache::Dependency::ParentVer
map_pointer< Version > ParentVer
version of the package which has the depends
Definition pkgcache.h:762
pkgCache::Dependency::ID
map_id_t ID
unique sequel ID
Definition pkgcache.h:769
pkgCache::DescFile
associates a description with a Translation file
Definition pkgcache.h:609
pkgCache::DescFile::NextFile
map_pointer< DescFile > NextFile
next step in the linked list
Definition pkgcache.h:613
pkgCache::DescFile::Offset
map_filesize_t Offset
position in the file
Definition pkgcache.h:615
pkgCache::DescFile::Size
map_filesize_t Size
Definition pkgcache.h:617
pkgCache::DescFile::File
map_pointer< PackageFile > File
index of the file that this description was found in
Definition pkgcache.h:611
pkgCache::Description
datamember of a linked list of available description for a version
Definition pkgcache.h:709
pkgCache::Description::NextDesc
map_pointer< Description > NextDesc
next translation for this description
Definition pkgcache.h:724
pkgCache::Description::ParentPkg
map_pointer< Package > ParentPkg
the text is a description of this package
Definition pkgcache.h:726
pkgCache::Description::md5sum
map_stringitem_t md5sum
MD5sum of the original description.
Definition pkgcache.h:719
pkgCache::Description::ID
map_id_t ID
unique sequel ID
Definition pkgcache.h:729
pkgCache::Description::FileList
map_pointer< DescFile > FileList
Definition pkgcache.h:722
pkgCache::Description::language_code
map_stringitem_t language_code
Language code of this description (translation)
Definition pkgcache.h:714
pkgCache::Flag
Definition pkgcache.h:194
pkgCache::Flag::ProvidesFlags
ProvidesFlags
Definition pkgcache.h:205
pkgCache::Flag::ArchSpecific
@ ArchSpecific
Definition pkgcache.h:207
pkgCache::Flag::MultiArchImplicit
@ MultiArchImplicit
Definition pkgcache.h:206
pkgCache::Flag::ReleaseFileFlags
ReleaseFileFlags
Definition pkgcache.h:201
pkgCache::Flag::NotAutomatic
@ NotAutomatic
Definition pkgcache.h:202
pkgCache::Flag::ButAutomaticUpgrades
@ ButAutomaticUpgrades
Definition pkgcache.h:203
pkgCache::Flag::PkgFFlags
PkgFFlags
Definition pkgcache.h:196
pkgCache::Flag::NotSource
@ NotSource
Definition pkgcache.h:197
pkgCache::Flag::NoPackages
@ NoPackages
Definition pkgcache.h:199
pkgCache::Flag::LocalSource
@ LocalSource
Definition pkgcache.h:198
pkgCache::Group
groups architecture depending packages together
Definition pkgcache.h:417
pkgCache::Group::Name
map_stringitem_t Name
Name of the group.
Definition pkgcache.h:419
pkgCache::Group::Next
map_pointer< Group > Next
Link to the next Group.
Definition pkgcache.h:428
pkgCache::Group::VersionsInSource
map_pointer< Version > VersionsInSource
List of binary produces by source package with this name.
Definition pkgcache.h:433
pkgCache::Group::FirstPackage
map_pointer< Package > FirstPackage
Link to the first package which belongs to the group.
Definition pkgcache.h:423
pkgCache::Group::LastPackage
map_pointer< Package > LastPackage
Link to the last package which belongs to the group.
Definition pkgcache.h:425
pkgCache::Group::d
map_pointer< void > d
Private pointer.
Definition pkgcache.h:436
pkgCache::Group::ID
map_id_t ID
unique sequel ID
Definition pkgcache.h:430
pkgCache::Header
Definition pkgcache.h:294
pkgCache::Header::HashTableSize
uint32_t HashTableSize
hash tables providing rapid group/package name lookup
Definition pkgcache.h:387
pkgCache::Header::MajorVersion
map_number_t MajorVersion
Definition pkgcache.h:302
pkgCache::Header::Signature
uint32_t Signature
Signature information.
Definition pkgcache.h:300
pkgCache::Header::Pools
DynamicMMap::Pool Pools[2 *12]
The Pool structures manage the allocation pools that the generator uses.
Definition pkgcache.h:375
pkgCache::Header::CacheFileSize
map_filesize_small_t CacheFileSize
Hash of the file (TODO: Rename)
Definition pkgcache.h:399
pkgCache::Header::HeaderSz
uint16_t HeaderSz
Size of structure values.
Definition pkgcache.h:318
pkgCache::Header::VerSysName
map_stringitem_t VerSysName
String representing the version system used.
Definition pkgcache.h:357
pkgCache::Header::MaxVerFileSize
map_filesize_t MaxVerFileSize
The maximum size of a raw entry from the original Package file.
Definition pkgcache.h:363
pkgCache::Header::MaxDescFileSize
map_filesize_t MaxDescFileSize
The maximum size of a raw entry from the original Translation file.
Definition pkgcache.h:365
pkgCache::Header::RlsFileList
map_pointer< ReleaseFile > RlsFileList
index of the first ReleaseFile structure
Definition pkgcache.h:354
pkgCache::Header::Architectures
map_stringitem_t Architectures
all architectures the cache was built against
Definition pkgcache.h:361
pkgCache::Header::Architecture
map_stringitem_t Architecture
native architecture the cache was built against
Definition pkgcache.h:359
pkgCache::Header::GroupCount
map_id_t GroupCount
Structure counts.
Definition pkgcache.h:336
pkgCache::Header::FileList
map_pointer< PackageFile > FileList
index of the first PackageFile structure
Definition pkgcache.h:352
pkgCache::Header::Dirty
bool Dirty
indicates if the cache should be erased
Definition pkgcache.h:309
pkgCache::PackageFile
stores information about the files used to generate the cache
Definition pkgcache.h:554
pkgCache::PackageFile::NextFile
map_pointer< PackageFile > NextFile
Link to the next PackageFile in the Cache.
Definition pkgcache.h:581
pkgCache::PackageFile::ID
map_fileid_t ID
unique sequel ID
Definition pkgcache.h:583
pkgCache::PackageFile::mtime
time_t mtime
Modification time for the file.
Definition pkgcache.h:574
pkgCache::PackageFile::FileName
map_stringitem_t FileName
physical disk file that this PackageFile represents
Definition pkgcache.h:556
pkgCache::PackageFile::Flags
map_flags_t Flags
Definition pkgcache.h:577
pkgCache::PackageFile::IndexType
map_stringitem_t IndexType
indicates what sort of index file this is
Definition pkgcache.h:566
pkgCache::PackageFile::Size
map_filesize_t Size
Size of the file.
Definition pkgcache.h:572
pkgCache::PackageFile::d
map_pointer< void > d
Private pointer.
Definition pkgcache.h:586
pkgCache::PackageFile::Release
map_pointer< ReleaseFile > Release
the release information
Definition pkgcache.h:558
pkgCache::Package
contains information for a single unique package
Definition pkgcache.h:452
pkgCache::Package::RevDepends
map_pointer< Dependency > RevDepends
List of all dependencies on this package.
Definition pkgcache.h:474
pkgCache::Package::CurrentState
map_number_t CurrentState
indicates if the package is installed
Definition pkgcache.h:488
pkgCache::Package::Arch
map_stringitem_t Arch
Architecture of the package.
Definition pkgcache.h:454
pkgCache::Package::VersionList
map_pointer< Version > VersionList
Base of a singly linked list of versions.
Definition pkgcache.h:464
pkgCache::Package::InstState
map_number_t InstState
installation state of the package
Definition pkgcache.h:486
pkgCache::Package::Group
map_pointer< pkgCache::Group > Group
index of the group this package belongs to
Definition pkgcache.h:468
pkgCache::Package::CurrentVer
map_pointer< Version > CurrentVer
index to the installed version
Definition pkgcache.h:466
pkgCache::Package::Flags
map_flags_t Flags
some useful indicators of the package's state
Definition pkgcache.h:498
pkgCache::Package::NextPackage
map_pointer< Package > NextPackage
Link to the next package in the same bucket.
Definition pkgcache.h:472
pkgCache::Package::SelectedState
map_number_t SelectedState
state that the user wishes the package to be in
Definition pkgcache.h:480
pkgCache::Package::d
map_pointer< void > d
Private pointer.
Definition pkgcache.h:501
pkgCache::Package::ProvidesList
map_pointer< Provides > ProvidesList
List of all "packages" this package provide.
Definition pkgcache.h:476
pkgCache::Package::ID
map_id_t ID
unique sequel ID
Definition pkgcache.h:496
pkgCache::Provides
handles virtual packages
Definition pkgcache.h:782
pkgCache::Provides::NextPkgProv
map_pointer< Provides > NextPkgProv
next provides (based of version)
Definition pkgcache.h:796
pkgCache::Provides::Version
map_pointer< pkgCache::Version > Version
index of the version this provide line applies to
Definition pkgcache.h:786
pkgCache::Provides::ParentPkg
map_pointer< Package > ParentPkg
index of the package providing this
Definition pkgcache.h:784
pkgCache::Provides::NextProvides
map_pointer< Provides > NextProvides
next provides (based of package)
Definition pkgcache.h:794
pkgCache::Provides::ProvideVersion
map_stringitem_t ProvideVersion
version in the provides line (if any)
Definition pkgcache.h:791
pkgCache::ReleaseFile
stores information about the release files used to generate the cache
Definition pkgcache.h:510
pkgCache::ReleaseFile::Archive
map_stringitem_t Archive
the release information
Definition pkgcache.h:517
pkgCache::ReleaseFile::ID
map_fileid_t ID
unique sequel ID
Definition pkgcache.h:541
pkgCache::ReleaseFile::Site
map_stringitem_t Site
The site the index file was fetched from.
Definition pkgcache.h:523
pkgCache::ReleaseFile::NextFile
map_pointer< ReleaseFile > NextFile
Link to the next ReleaseFile in the Cache.
Definition pkgcache.h:539
pkgCache::ReleaseFile::mtime
time_t mtime
Modification time for the file.
Definition pkgcache.h:532
pkgCache::ReleaseFile::FileName
map_stringitem_t FileName
physical disk file that this ReleaseFile represents
Definition pkgcache.h:512
pkgCache::ReleaseFile::Flags
map_flags_t Flags
Definition pkgcache.h:535
pkgCache::ReleaseFile::Size
map_filesize_t Size
Size of the file.
Definition pkgcache.h:530
pkgCache::ReleaseFile::d
map_pointer< void > d
Private pointer.
Definition pkgcache.h:544
pkgCache::State
Definition pkgcache.h:181
pkgCache::State::VerPriority
VerPriority
priority of a package version
Definition pkgcache.h:185
pkgCache::VerFile
associates a version with a PackageFile
Definition pkgcache.h:595
pkgCache::VerFile::NextFile
map_pointer< VerFile > NextFile
next step in the linked list
Definition pkgcache.h:599
pkgCache::VerFile::Offset
map_filesize_t Offset
position in the package file
Definition pkgcache.h:601
pkgCache::VerFile::Size
map_filesize_t Size
Definition pkgcache.h:603
pkgCache::VerFile::File
map_pointer< PackageFile > File
index of the package file that this version was found in
Definition pkgcache.h:597
pkgCache::Version
information for a single version of a package
Definition pkgcache.h:627
pkgCache::Version::MultiArch
map_number_t MultiArch
stores the MultiArch capabilities of this version
Definition pkgcache.h:654
pkgCache::Version::VerStr
map_stringitem_t VerStr
complete version string
Definition pkgcache.h:631
pkgCache::Version::Priority
map_number_t Priority
parsed priority value
Definition pkgcache.h:690
pkgCache::Version::NextVer
map_pointer< Version > NextVer
next (lower or equal) version in the linked list
Definition pkgcache.h:664
pkgCache::Version::Section
map_stringitem_t Section
section this version is filled in
Definition pkgcache.h:633
pkgCache::Version::SourcePkgName
map_stringitem_t SourcePkgName
source package name this version comes from Always contains the name, even if it is the same as the b...
Definition pkgcache.h:636
pkgCache::Version::Hash
uint32_t Hash
characteristic value representing this version
Definition pkgcache.h:686
pkgCache::Version::InstalledSize
map_filesize_t InstalledSize
uncompressed size for this version
Definition pkgcache.h:681
pkgCache::Version::VerMultiArch
VerMultiArch
Multi-Arch capabilities of a package version.
Definition pkgcache.h:642
pkgCache::Version::Same
@ Same
Definition pkgcache.h:645
pkgCache::Version::Foreign
@ Foreign
Definition pkgcache.h:644
pkgCache::Version::Allowed
@ Allowed
Definition pkgcache.h:646
pkgCache::Version::All
@ All
Definition pkgcache.h:643
pkgCache::Version::No
@ No
Definition pkgcache.h:642
pkgCache::Version::Size
map_filesize_t Size
archive size for this version
Definition pkgcache.h:679
pkgCache::Version::ParentPkg
map_pointer< Package > ParentPkg
links to the owning package
Definition pkgcache.h:672
pkgCache::Version::NextInSource
map_pointer< Version > NextInSource
next version in the source package (might be different binary)
Definition pkgcache.h:692
pkgCache::Version::DependsList
map_pointer< Dependency > DependsList
base of the dependency list
Definition pkgcache.h:668
pkgCache::Version::ProvidesList
map_pointer< Provides > ProvidesList
list of pkgCache::Provides
Definition pkgcache.h:674
pkgCache::Version::ID
map_id_t ID
unique sequel ID
Definition pkgcache.h:688
pkgCache::Version::SourceVerStr
map_stringitem_t SourceVerStr
source version this version comes from Always contains the version string, even if it is the same as ...
Definition pkgcache.h:639
pkgCache::Version::d
map_pointer< Extra > d
Private pointer.
Definition pkgcache.h:695
pkgCache::Version::FileList
map_pointer< VerFile > FileList
references all the PackageFile's that this version came from
Definition pkgcache.h:662
pkgCache::Version::DescriptionList
map_pointer< Description > DescriptionList
next description in the linked list
Definition pkgcache.h:666