apt: apt-pkg/pkgcache.h Source File

apt 3.1.4 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#include <string_view>
85
86
87
88// size of (potentially big) files like debs or the install size of them
89typedef uint64_t map_filesize_t;
90// storing file sizes of indexes, which are way below 4 GB for now
91typedef uint32_t map_filesize_small_t;
92// each package/group/dependency gets an id
93typedef uint32_t map_id_t;
94// some files get an id, too, but in far less absolute numbers
95typedef uint16_t map_fileid_t;
96
97// relative pointer from cache start
98 template <typename T> class map_pointer {
99 uint32_t val;
100public:
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
108template<typename T> inline T *operator +(T *p, map_pointer<T> m) { return p + uint32_t(m); }
109template<typename T> inline bool operator ==(map_pointer<T> u, map_pointer<T> m) { return uint32_t(u) == uint32_t(m); }
110template<typename T> inline bool operator !=(map_pointer<T> u, map_pointer<T> m) { return uint32_t(u) != uint32_t(m); }
111template<typename T> inline bool operator <(map_pointer<T> u, map_pointer<T> m) { return uint32_t(u) < uint32_t(m); }
112template<typename T> inline bool operator >(map_pointer<T> u, map_pointer<T> m) { return uint32_t(u) > uint32_t(m); }
113template<typename T> inline uint32_t operator -(map_pointer<T> u, map_pointer<T> m) { return uint32_t(u) - uint32_t(m); }
114template<typename T> bool operator ==(map_pointer<T> m, std::nullptr_t) { return uint32_t(m) == 0; }
115template<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
118typedef map_pointer<char> map_stringitem_t;
119
120// we have only a small amount of flags for each item
121typedef uint8_t map_flags_t;
122typedef uint8_t map_number_t;
123
124class 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 SourceVersion;
135 struct Version;
136 struct Description;
137 struct Provides;
138 struct Dependency;
139 struct DependencyData;
140 struct StringItem;
141 struct VerFile;
142 struct DescFile;
143
144 // Iterators
145 template<typename Str, typename Itr> class Iterator;
146 class GrpIterator;
147 class PkgIterator;
148 class VerIterator;
149 class SrcVerIterator;
150 class DescIterator;
151 class DepIterator;
152 class PrvIterator;
153 class RlsFileIterator;
154 class PkgFileIterator;
155 class VerFileIterator;
156 class DescFileIterator;
157
158 class Namespace;
159
160 // These are all the constants used in the cache structures
161
162 // WARNING - if you change these lists you must also edit
163 // the stringification in pkgcache.cc and also consider whether
164 // the cache file will become incompatible.
165 struct Dep
166 {
167 enum DepType {Depends=1,PreDepends=2,Suggests=3,Recommends=4,
168 Conflicts=5,Replaces=6,Obsoletes=7,DpkgBreaks=8,Enhances=9};
174 enum DepCompareOp {NoOp=0,LessEq=0x1,GreaterEq=0x2,Less=0x3,
175 Greater=0x4,Equals=0x5,NotEquals=0x6,
176 Or=0x10,
177 MultiArchImplicit=0x20,
178 ArchSpecific=0x40
179 };
180 };
181
182 struct State
183 {
187 enum VerPriority {Required=1,Important=2,Standard=3,Optional=4,Extra=5};
188 enum PkgSelectedState {Unknown=0,Install=1,Hold=2,DeInstall=3,Purge=4};
189 enum PkgInstState {Ok=0,ReInstReq=1,HoldInst=2,HoldReInstReq=3};
190 enum PkgCurrentState {NotInstalled=0,UnPacked=1,HalfConfigured=2,
191 HalfInstalled=4,ConfigFiles=5,Installed=6,
192 TriggersAwaited=7,TriggersPending=8};
193 };
194
195 struct Flag
196 {
197 enum PkgFlags {Auto=(1<<0),Essential=(1<<3),Important=(1<<4)};
198 enum PkgFFlags {
199 NotSource=(1<<0),
200 LocalSource=(1<<1),
201 NoPackages=(1<<2),
202 };
203 enum ReleaseFileFlags {
204 NotAutomatic=(1<<0),
205 ButAutomaticUpgrades=(1<<1),
206 };
207 enum ProvidesFlags {
208 MultiArchImplicit=pkgCache::Dep::MultiArchImplicit,
209 ArchSpecific=pkgCache::Dep::ArchSpecific
210 };
211 };
212
213 protected:
214
215 // Memory mapped cache file
216 std::string CacheFile;
217 MMap &Map;
218 map_id_t sHash(std::string_view S) const APT_PURE;
219
220 public:
221
222 // Pointers to the arrays of items
223 Header *HeaderP;
224 Group *GrpP;
225 Package *PkgP;
226 VerFile *VerFileP;
227 DescFile *DescFileP;
228 ReleaseFile *RlsFileP;
229 PackageFile *PkgFileP;
230 SourceVersion *SrcVerP; // reserved for SourceVersion objects
231 Version *VerP;
232 Description *DescP;
233 Provides *ProvideP;
234 Dependency *DepP;
235 DependencyData *DepDataP;
236 char *StrP;
237 void *reserved[13];
238
239 virtual bool ReMap(bool const &Errorchecks = true);
240 inline bool Sync() {return Map.Sync();}
241 inline MMap &GetMap() {return Map;}
242 inline void *DataEnd() {return ((unsigned char *)Map.Data()) + Map.Size();}
243
244 // String hashing function (512 range)
245 inline map_id_t Hash(std::string_view S) const {return sHash(S);}
246
247 APT_HIDDEN uint32_t CacheHash();
248
249 // Useful transformation things
250 static const char *Priority(unsigned char Priority);
251 static std::string_view Priority_NoL10n(unsigned char Prio);
252
253 // Accessors
254 GrpIterator FindGrp(std::string_view Name);
255 PkgIterator FindPkg(std::string_view Name);
256 PkgIterator FindPkg(std::string_view Name, std::string_view Arch);
257
258 std::string_view ViewString(map_stringitem_t idx) const
259 {
260 char *name = StrP + idx;
261 size_t len = *reinterpret_cast<const uint16_t *>(__builtin_assume_aligned(name - sizeof(uint16_t), sizeof(uint16_t)));
262 return {name, len};
263 }
264
265 Header &Head() {return *HeaderP;}
266 inline GrpIterator GrpBegin();
267 inline GrpIterator GrpEnd();
268 inline PkgIterator PkgBegin();
269 inline PkgIterator PkgEnd();
270 inline PkgFileIterator FileBegin();
271 inline PkgFileIterator FileEnd();
272 inline RlsFileIterator RlsFileBegin();
273 inline RlsFileIterator RlsFileEnd();
274
275 inline bool MultiArchCache() const { return MultiArchEnabled; }
276 inline char const * NativeArch();
277
278 // Make me a function
279 pkgVersioningSystem *VS;
280
281 // Converters
282 static const char *CompTypeDeb(unsigned char Comp) APT_PURE;
283 static const char *CompType(unsigned char Comp) APT_PURE;
284 static const char *DepType(unsigned char Dep);
285 static std::string_view DepType_NoL10n(unsigned char Dep);
286
287 pkgCache(MMap *Map,bool DoMap = true);
288 virtual ~pkgCache();
289
290private:
291 void * const d;
292 bool MultiArchEnabled;
293};
294 /*}}}*/
295// Header structure /*{{{*/
296 struct pkgCache::Header
297{
303 uint32_t Signature;
305 map_number_t MajorVersion;
306 map_number_t MinorVersion;
312 bool Dirty;
313
321 uint16_t HeaderSz;
322 map_number_t GroupSz;
323 map_number_t PackageSz;
324 map_number_t ReleaseFileSz;
325 map_number_t PackageFileSz;
326 map_number_t VersionSz;
327 map_number_t SourceVersionSz;
328 map_number_t DescriptionSz;
329 map_number_t DependencySz;
330 map_number_t DependencyDataSz;
331 map_number_t ProvidesSz;
332 map_number_t VerFileSz;
333 map_number_t DescFileSz;
334
340 map_id_t GroupCount;
341 map_id_t PackageCount;
342 map_id_t VersionCount;
343 map_id_t SourceVersionCount;
344 map_id_t DescriptionCount;
345 map_id_t DependsCount;
346 map_id_t DependsDataCount;
347 map_fileid_t ReleaseFileCount;
348 map_fileid_t PackageFileCount;
349 map_id_t VerFileCount;
350 map_id_t DescFileCount;
351 map_id_t ProvidesCount;
352
357 map_pointer<PackageFile> FileList;
359 map_pointer<ReleaseFile> RlsFileList;
360
362 map_stringitem_t VerSysName;
364 map_stringitem_t Architecture;
366 map_stringitem_t Architectures;
368 map_filesize_t MaxVerFileSize;
370 map_filesize_t MaxDescFileSize;
371
380 DynamicMMap::Pool Pools[2 * 13];
381
392 uint32_t HashTableSize;
393 uint32_t GetHashTableSize() const { return HashTableSize; }
394 void SetHashTableSize(unsigned int const sz) { HashTableSize = sz; }
395 map_stringitem_t GetArchitectures() const { return Architectures; }
396 void SetArchitectures(map_stringitem_t const idx) { Architectures = idx; }
397
398#ifdef APT_COMPILING_APT
399 map_pointer<Group> * GrpHashTableP() const { return (map_pointer<Group>*) (this + 1); }
400 map_pointer<Package> * PkgHashTableP() const { return reinterpret_cast<map_pointer<Package> *>(GrpHashTableP() + GetHashTableSize()); }
401#endif
402
404 map_filesize_small_t CacheFileSize;
405
406 bool CheckSizes(Header &Against) const APT_PURE;
407 Header();
408};
409 /*}}}*/
410// Group structure /*{{{*/
421 struct pkgCache::Group
422{
424 map_stringitem_t Name;
425
426 // Linked List
428 map_pointer<Package> FirstPackage;
430 map_pointer<Package> LastPackage;
431
433 map_pointer<Group> Next;
435 map_id_t ID;
436
438 map_pointer<Version> VersionsInSource;
439
441 map_pointer<SourceVersion> SourceVersionList;
442
444 map_pointer<void> d;
445};
446 /*}}}*/
447// Package structure /*{{{*/
459 struct pkgCache::Package
460{
462 map_stringitem_t Arch;
472 map_pointer<Version> VersionList;
474 map_pointer<Version> CurrentVer;
476 map_pointer<pkgCache::Group> Group;
477
478 // Linked list
480 map_pointer<Package> NextPackage;
482 map_pointer<Dependency> RevDepends;
484 map_pointer<Provides> ProvidesList;
485
486 // Install/Remove/Purge etc
488 map_number_t SelectedState; // What
494 map_number_t InstState; // Flags
496 map_number_t CurrentState; // State
497
504 map_id_t ID;
506 map_flags_t Flags;
507
509 map_pointer<void> d;
510};
511 /*}}}*/
512// Release File structure /*{{{*/
517 struct pkgCache::ReleaseFile
518{
520 map_stringitem_t FileName;
525 map_stringitem_t Archive;
526 map_stringitem_t Codename;
527 map_stringitem_t Version;
528 map_stringitem_t Origin;
529 map_stringitem_t Label;
531 map_stringitem_t Site;
532
538 map_filesize_t Size;
540 time_t mtime;
541
543 map_flags_t Flags;
544
545 // Linked list
547 map_pointer<ReleaseFile> NextFile;
549 map_fileid_t ID;
550
552 map_pointer<void> d;
553};
554 /*}}}*/
555// Package File structure /*{{{*/
561 struct pkgCache::PackageFile
562{
564 map_stringitem_t FileName;
566 map_pointer<ReleaseFile> Release;
567
568 map_stringitem_t Component;
569 map_stringitem_t Architecture;
570
574 map_stringitem_t IndexType;
580 map_filesize_t Size;
582 time_t mtime;
583
585 map_flags_t Flags;
586
587 // Linked list
589 map_pointer<PackageFile> NextFile;
591 map_fileid_t ID;
592
594 map_pointer<void> d;
595};
596 /*}}}*/
597// VerFile structure /*{{{*/
602 struct pkgCache::VerFile
603{
605 map_pointer<PackageFile> File;
607 map_pointer<VerFile> NextFile;
609 map_filesize_t Offset; // File offset
610};
611 /*}}}*/
612// DescFile structure /*{{{*/
614 struct pkgCache::DescFile
615{
617 map_pointer<PackageFile> File;
619 map_pointer<DescFile> NextFile;
621 map_filesize_t Offset; // File offset
622};
623 /*}}}*/
624// SourceVersion structure /*{{{*/
630 struct pkgCache::SourceVersion
631{
633 map_id_t ID;
635 map_pointer<pkgCache::Group> Group;
637 map_stringitem_t VerStr;
638 map_pointer<Version> VersionList [[gnu::unavailable("not yet available")]];
639 map_pointer<SourceVersion> NextSourceVersion [[gnu::unavailable("not yet available")]];
640
642 map_pointer<void> d;
643};
644 /*}}}*/
645// Version structure /*{{{*/
651 struct pkgCache::Version
652{
653 struct Extra;
654
656 map_stringitem_t VerStr;
658 map_stringitem_t Section;
659
661 map_pointer<pkgCache::SourceVersion> SourceVersion;
663 map_pointer<Version> NextInSourceVersion;
664
666 enum VerMultiArch { No = 0,
667 All = (1<<0),
668 Foreign = (1<<1),
669 Same = (1<<2),
670 Allowed = (1<<3),
671 AllForeign = All | Foreign,
672 AllAllowed = All | Allowed };
673
678 map_number_t MultiArch;
679
686 map_pointer<VerFile> FileList;
688 map_pointer<Version> NextVer;
690 map_pointer<Description> DescriptionList;
692 map_pointer<Dependency> DependsList;
696 map_pointer<Package> ParentPkg;
698 map_pointer<Provides> ProvidesList;
699
703 map_filesize_t Size; // These are the .deb size
705 map_filesize_t InstalledSize;
710 uint32_t Hash;
712 map_id_t ID;
714 map_number_t Priority;
716 map_pointer<Version> NextInSource;
717
719 map_pointer<Extra> d;
720};
721
722#ifdef APT_COMPILING_APT
724struct pkgCache::Version::Extra
725{
726 uint8_t PhasedUpdatePercentage;
727};
728#endif
729 /*}}}*/
730// Description structure /*{{{*/
732 struct pkgCache::Description
733{
738 map_stringitem_t language_code;
743 map_stringitem_t md5sum;
744
746 map_pointer<DescFile> FileList;
748 map_pointer<Description> NextDesc;
750 map_pointer<Package> ParentPkg;
751
753 map_id_t ID;
754};
755 /*}}}*/
756// Dependency structure /*{{{*/
763 struct pkgCache::DependencyData
764{
766 map_stringitem_t Version;
771 map_pointer<pkgCache::Package> Package;
772
774 map_number_t Type;
778 map_flags_t CompareOp;
779
780 map_pointer<DependencyData> NextData;
781};
782 struct pkgCache::Dependency
783{
784 map_pointer<pkgCache::DependencyData> DependencyData;
786 map_pointer<Version> ParentVer;
788 map_pointer<Dependency> NextRevDepends;
790 map_pointer<Dependency> NextDepends;
791
793 map_id_t ID;
794};
795 /*}}}*/
796// Provides structure /*{{{*/
805 struct pkgCache::Provides
806{
808 map_pointer<Package> ParentPkg;
810 map_pointer<pkgCache::Version> Version;
815 map_stringitem_t ProvideVersion;
816 map_flags_t Flags;
818 map_pointer<Provides> NextProvides;
820 map_pointer<Provides> NextPkgProv;
821};
822 /*}}}*/
823
824inline char const * pkgCache::NativeArch()
825 { return StrP + HeaderP->Architecture; }
826
827#include <apt-pkg/cacheiterators.h>
828
829 inline pkgCache::GrpIterator pkgCache::GrpBegin()
830 {
831 return GrpIterator(*this);
832 }
833 inline pkgCache::GrpIterator pkgCache::GrpEnd()
834 {
835 return GrpIterator(*this, GrpP);}
836inline pkgCache::PkgIterator pkgCache::PkgBegin()
837 {return PkgIterator(*this);}
838inline pkgCache::PkgIterator pkgCache::PkgEnd()
839 {return PkgIterator(*this,PkgP);}
840inline pkgCache::PkgFileIterator pkgCache::FileBegin()
841 {return PkgFileIterator(*this,PkgFileP + HeaderP->FileList);}
842inline pkgCache::PkgFileIterator pkgCache::FileEnd()
843 {return PkgFileIterator(*this,PkgFileP);}
844inline pkgCache::RlsFileIterator pkgCache::RlsFileBegin()
845 {return RlsFileIterator(*this,RlsFileP + HeaderP->RlsFileList);}
846inline pkgCache::RlsFileIterator pkgCache::RlsFileEnd()
847 {return RlsFileIterator(*this,RlsFileP);}
848
849
850// Oh I wish for Real Name Space Support
851 class pkgCache::Namespace /*{{{*/
852{
853 public:
854 typedef pkgCache::GrpIterator GrpIterator;
855 typedef pkgCache::PkgIterator PkgIterator;
856 typedef pkgCache::VerIterator VerIterator;
857 typedef pkgCache::SrcVerIterator SrcVerIterator;
858 typedef pkgCache::DescIterator DescIterator;
859 typedef pkgCache::DepIterator DepIterator;
860 typedef pkgCache::PrvIterator PrvIterator;
861 typedef pkgCache::RlsFileIterator RlsFileIterator;
862 typedef pkgCache::PkgFileIterator PkgFileIterator;
863 typedef pkgCache::VerFileIterator VerFileIterator;
864 typedef pkgCache::Version Version;
865 typedef pkgCache::Description Description;
866 typedef pkgCache::Package Package;
867 typedef pkgCache::Header Header;
868 typedef pkgCache::Dep Dep;
869 typedef pkgCache::Flag Flag;
870};
871 /*}}}*/
872#undef __PKGLIB_IN_PKGCACHE_H
873#endif
MMap
Definition mmap.h:45
map_pointer
Definition pkgcache.h:98
pkgCache::DepIterator
Definition cacheiterators.h:327
pkgCache::DescFileIterator
Definition cacheiterators.h:535
pkgCache::DescIterator
Definition cacheiterators.h:301
pkgCache::GrpIterator
Definition cacheiterators.h:106
pkgCache::Iterator
Definition cacheiterators.h:47
pkgCache::Namespace
Definition pkgcache.h:852
pkgCache::PkgFileIterator
Definition cacheiterators.h:483
pkgCache::PkgIterator
Definition cacheiterators.h:147
pkgCache::PrvIterator
Definition cacheiterators.h:413
pkgCache::RlsFileIterator
Definition cacheiterators.h:454
pkgCache::SrcVerIterator
Definition cacheiterators.h:194
pkgCache::VerFileIterator
Definition cacheiterators.h:517
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:764
pkgCache::DependencyData::CompareOp
map_flags_t CompareOp
comparison operator specified on the depends line
Definition pkgcache.h:778
pkgCache::DependencyData::Version
map_stringitem_t Version
string of the version the dependency is applied against
Definition pkgcache.h:766
pkgCache::DependencyData::Package
map_pointer< pkgCache::Package > Package
index of the package this depends applies to
Definition pkgcache.h:771
pkgCache::DependencyData::Type
map_number_t Type
Dependency type - Depends, Recommends, Conflicts, etc.
Definition pkgcache.h:774
pkgCache::Dependency
Definition pkgcache.h:783
pkgCache::Dependency::NextRevDepends
map_pointer< Dependency > NextRevDepends
next reverse dependency of this package
Definition pkgcache.h:788
pkgCache::Dependency::NextDepends
map_pointer< Dependency > NextDepends
next dependency of this version
Definition pkgcache.h:790
pkgCache::Dependency::ParentVer
map_pointer< Version > ParentVer
version of the package which has the depends
Definition pkgcache.h:786
pkgCache::Dependency::ID
map_id_t ID
unique sequel ID
Definition pkgcache.h:793
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:733
pkgCache::Description::NextDesc
map_pointer< Description > NextDesc
next translation for this description
Definition pkgcache.h:748
pkgCache::Description::ParentPkg
map_pointer< Package > ParentPkg
the text is a description of this package
Definition pkgcache.h:750
pkgCache::Description::md5sum
map_stringitem_t md5sum
MD5sum of the original description.
Definition pkgcache.h:743
pkgCache::Description::ID
map_id_t ID
unique sequel ID
Definition pkgcache.h:753
pkgCache::Description::FileList
map_pointer< DescFile > FileList
Definition pkgcache.h:746
pkgCache::Description::language_code
map_stringitem_t language_code
Language code of this description (translation)
Definition pkgcache.h:738
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:806
pkgCache::Provides::NextPkgProv
map_pointer< Provides > NextPkgProv
next provides (based of version)
Definition pkgcache.h:820
pkgCache::Provides::Version
map_pointer< pkgCache::Version > Version
index of the version this provide line applies to
Definition pkgcache.h:810
pkgCache::Provides::ParentPkg
map_pointer< Package > ParentPkg
index of the package providing this
Definition pkgcache.h:808
pkgCache::Provides::NextProvides
map_pointer< Provides > NextProvides
next provides (based of package)
Definition pkgcache.h:818
pkgCache::Provides::ProvideVersion
map_stringitem_t ProvideVersion
version in the provides line (if any)
Definition pkgcache.h:815
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