apt 2.9.16 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
249 // Accessors
250 GrpIterator FindGrp(APT::StringView Name);
251 PkgIterator FindPkg(APT::StringView Name);
252 PkgIterator FindPkg(APT::StringView Name, APT::StringView Arch);
253
254 APT::StringView ViewString(map_stringitem_t idx) const
255 {
256 char *name = StrP + idx;
257 uint16_t len = *reinterpret_cast<const uint16_t*>(name - sizeof(uint16_t));
258 return APT::StringView(name, len);
259 }
260
261 Header &Head() {return *HeaderP;}
262 inline GrpIterator GrpBegin();
263 inline GrpIterator GrpEnd();
264 inline PkgIterator PkgBegin();
265 inline PkgIterator PkgEnd();
266 inline PkgFileIterator FileBegin();
267 inline PkgFileIterator FileEnd();
268 inline RlsFileIterator RlsFileBegin();
269 inline RlsFileIterator RlsFileEnd();
270
271 inline bool MultiArchCache() const { return MultiArchEnabled; }
272 inline char const * NativeArch();
273
274 // Make me a function
275 pkgVersioningSystem *VS;
276
277 // Converters
278 static const char *CompTypeDeb(unsigned char Comp) APT_PURE;
279 static const char *CompType(unsigned char Comp) APT_PURE;
280 static const char *DepType(unsigned char Dep);
281
282 pkgCache(MMap *Map,bool DoMap = true);
283 virtual ~pkgCache();
284
285 private:
286 void * const d;
287 bool MultiArchEnabled;
288};
289 /*}}}*/
290// Header structure /*{{{*/
291 struct pkgCache::Header
292{
298 uint32_t Signature;
300 map_number_t MajorVersion;
301 map_number_t MinorVersion;
307 bool Dirty;
308
316 uint16_t HeaderSz;
317 map_number_t GroupSz;
318 map_number_t PackageSz;
319 map_number_t ReleaseFileSz;
320 map_number_t PackageFileSz;
321 map_number_t VersionSz;
322 map_number_t DescriptionSz;
323 map_number_t DependencySz;
324 map_number_t DependencyDataSz;
325 map_number_t ProvidesSz;
326 map_number_t VerFileSz;
327 map_number_t DescFileSz;
328
334 map_id_t GroupCount;
335 map_id_t PackageCount;
336 map_id_t VersionCount;
337 map_id_t DescriptionCount;
338 map_id_t DependsCount;
339 map_id_t DependsDataCount;
340 map_fileid_t ReleaseFileCount;
341 map_fileid_t PackageFileCount;
342 map_fileid_t VerFileCount;
343 map_fileid_t DescFileCount;
344 map_id_t ProvidesCount;
345
350 map_pointer<PackageFile> FileList;
352 map_pointer<ReleaseFile> RlsFileList;
353
355 map_stringitem_t VerSysName;
357 map_stringitem_t Architecture;
359 map_stringitem_t Architectures;
361 map_filesize_t MaxVerFileSize;
363 map_filesize_t MaxDescFileSize;
364
373 DynamicMMap::Pool Pools[2 * 12];
374
385 uint32_t HashTableSize;
386 uint32_t GetHashTableSize() const { return HashTableSize; }
387 void SetHashTableSize(unsigned int const sz) { HashTableSize = sz; }
388 map_stringitem_t GetArchitectures() const { return Architectures; }
389 void SetArchitectures(map_stringitem_t const idx) { Architectures = idx; }
390
391#ifdef APT_COMPILING_APT
392 map_pointer<Group> * GrpHashTableP() const { return (map_pointer<Group>*) (this + 1); }
393 map_pointer<Package> * PkgHashTableP() const { return reinterpret_cast<map_pointer<Package> *>(GrpHashTableP() + GetHashTableSize()); }
394#endif
395
397 map_filesize_small_t CacheFileSize;
398
399 bool CheckSizes(Header &Against) const APT_PURE;
400 Header();
401};
402 /*}}}*/
403// Group structure /*{{{*/
414 struct pkgCache::Group
415{
417 map_stringitem_t Name;
418
419 // Linked List
421 map_pointer<Package> FirstPackage;
423 map_pointer<Package> LastPackage;
424
426 map_pointer<Group> Next;
428 map_id_t ID;
429
431 map_pointer<Version> VersionsInSource;
432
434 map_pointer<void> d;
435};
436 /*}}}*/
437// Package structure /*{{{*/
449 struct pkgCache::Package
450{
452 map_stringitem_t Arch;
462 map_pointer<Version> VersionList;
464 map_pointer<Version> CurrentVer;
466 map_pointer<pkgCache::Group> Group;
467
468 // Linked list
470 map_pointer<Package> NextPackage;
472 map_pointer<Dependency> RevDepends;
474 map_pointer<Provides> ProvidesList;
475
476 // Install/Remove/Purge etc
478 map_number_t SelectedState; // What
484 map_number_t InstState; // Flags
486 map_number_t CurrentState; // State
487
494 map_id_t ID;
496 map_flags_t Flags;
497
499 map_pointer<void> d;
500};
501 /*}}}*/
502// Release File structure /*{{{*/
507 struct pkgCache::ReleaseFile
508{
510 map_stringitem_t FileName;
515 map_stringitem_t Archive;
516 map_stringitem_t Codename;
517 map_stringitem_t Version;
518 map_stringitem_t Origin;
519 map_stringitem_t Label;
521 map_stringitem_t Site;
522
528 map_filesize_t Size;
530 time_t mtime;
531
533 map_flags_t Flags;
534
535 // Linked list
537 map_pointer<ReleaseFile> NextFile;
539 map_fileid_t ID;
540
542 map_pointer<void> d;
543};
544 /*}}}*/
545// Package File structure /*{{{*/
551 struct pkgCache::PackageFile
552{
554 map_stringitem_t FileName;
556 map_pointer<ReleaseFile> Release;
557
558 map_stringitem_t Component;
559 map_stringitem_t Architecture;
560
564 map_stringitem_t IndexType;
570 map_filesize_t Size;
572 time_t mtime;
573
575 map_flags_t Flags;
576
577 // Linked list
579 map_pointer<PackageFile> NextFile;
581 map_fileid_t ID;
582
584 map_pointer<void> d;
585};
586 /*}}}*/
587// VerFile structure /*{{{*/
592 struct pkgCache::VerFile
593{
595 map_pointer<PackageFile> File;
597 map_pointer<VerFile> NextFile;
599 map_filesize_t Offset; // File offset
601 map_filesize_t Size;
602};
603 /*}}}*/
604// DescFile structure /*{{{*/
606 struct pkgCache::DescFile
607{
609 map_pointer<PackageFile> File;
611 map_pointer<DescFile> NextFile;
613 map_filesize_t Offset; // File offset
615 map_filesize_t Size;
616};
617 /*}}}*/
618// Version structure /*{{{*/
624 struct pkgCache::Version
625{
626 struct Extra;
627
629 map_stringitem_t VerStr;
631 map_stringitem_t Section;
634 map_stringitem_t SourcePkgName;
637 map_stringitem_t SourceVerStr;
638
640 enum VerMultiArch { No = 0,
641 All = (1<<0),
642 Foreign = (1<<1),
643 Same = (1<<2),
644 Allowed = (1<<3),
645 AllForeign = All | Foreign,
646 AllAllowed = All | Allowed };
647
652 map_number_t MultiArch;
653
660 map_pointer<VerFile> FileList;
662 map_pointer<Version> NextVer;
664 map_pointer<Description> DescriptionList;
666 map_pointer<Dependency> DependsList;
670 map_pointer<Package> ParentPkg;
672 map_pointer<Provides> ProvidesList;
673
677 map_filesize_t Size; // These are the .deb size
679 map_filesize_t InstalledSize;
684 uint32_t Hash;
686 map_id_t ID;
688 map_number_t Priority;
690 map_pointer<Version> NextInSource;
691
693 map_pointer<Extra> d;
694};
695
696#ifdef APT_COMPILING_APT
698 struct pkgCache::Version::Extra
699{
700 uint8_t PhasedUpdatePercentage;
701};
702#endif
703 /*}}}*/
704// Description structure /*{{{*/
706 struct pkgCache::Description
707{
712 map_stringitem_t language_code;
717 map_stringitem_t md5sum;
718
720 map_pointer<DescFile> FileList;
722 map_pointer<Description> NextDesc;
724 map_pointer<Package> ParentPkg;
725
727 map_id_t ID;
728};
729 /*}}}*/
730// Dependency structure /*{{{*/
737 struct pkgCache::DependencyData
738{
740 map_stringitem_t Version;
745 map_pointer<pkgCache::Package> Package;
746
748 map_number_t Type;
752 map_flags_t CompareOp;
753
754 map_pointer<DependencyData> NextData;
755};
756 struct pkgCache::Dependency
757{
758 map_pointer<pkgCache::DependencyData> DependencyData;
760 map_pointer<Version> ParentVer;
762 map_pointer<Dependency> NextRevDepends;
764 map_pointer<Dependency> NextDepends;
765
767 map_id_t ID;
768};
769 /*}}}*/
770// Provides structure /*{{{*/
779 struct pkgCache::Provides
780{
782 map_pointer<Package> ParentPkg;
784 map_pointer<pkgCache::Version> Version;
789 map_stringitem_t ProvideVersion;
790 map_flags_t Flags;
792 map_pointer<Provides> NextProvides;
794 map_pointer<Provides> NextPkgProv;
795};
796 /*}}}*/
797
798 inline char const * pkgCache::NativeArch()
799 { return StrP + HeaderP->Architecture; }
800
801#include <apt-pkg/cacheiterators.h>
802
803 inline pkgCache::GrpIterator pkgCache::GrpBegin()
804 {
805 return GrpIterator(*this);
806 }
807 inline pkgCache::GrpIterator pkgCache::GrpEnd()
808 {
809 return GrpIterator(*this, GrpP);}
810 inline pkgCache::PkgIterator pkgCache::PkgBegin()
811 {return PkgIterator(*this);}
812 inline pkgCache::PkgIterator pkgCache::PkgEnd()
813 {return PkgIterator(*this,PkgP);}
814 inline pkgCache::PkgFileIterator pkgCache::FileBegin()
815 {return PkgFileIterator(*this,PkgFileP + HeaderP->FileList);}
816 inline pkgCache::PkgFileIterator pkgCache::FileEnd()
817 {return PkgFileIterator(*this,PkgFileP);}
818 inline pkgCache::RlsFileIterator pkgCache::RlsFileBegin()
819 {return RlsFileIterator(*this,RlsFileP + HeaderP->RlsFileList);}
820 inline pkgCache::RlsFileIterator pkgCache::RlsFileEnd()
821 {return RlsFileIterator(*this,RlsFileP);}
822
823
824// Oh I wish for Real Name Space Support
825 class pkgCache::Namespace /*{{{*/
826{
827 public:
828 typedef pkgCache::GrpIterator GrpIterator;
829 typedef pkgCache::PkgIterator PkgIterator;
830 typedef pkgCache::VerIterator VerIterator;
831 typedef pkgCache::DescIterator DescIterator;
832 typedef pkgCache::DepIterator DepIterator;
833 typedef pkgCache::PrvIterator PrvIterator;
834 typedef pkgCache::RlsFileIterator RlsFileIterator;
835 typedef pkgCache::PkgFileIterator PkgFileIterator;
836 typedef pkgCache::VerFileIterator VerFileIterator;
837 typedef pkgCache::Version Version;
838 typedef pkgCache::Description Description;
839 typedef pkgCache::Package Package;
840 typedef pkgCache::Header Header;
841 typedef pkgCache::Dep Dep;
842 typedef pkgCache::Flag Flag;
843};
844 /*}}}*/
845#undef __PKGLIB_IN_PKGCACHE_H
846#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 pkgcache.h:144
pkgCache::Namespace
Definition pkgcache.h:826
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
pkgCache
Definition pkgcache.h:126
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::MultiArchImplicit
@ MultiArchImplicit
Definition pkgcache.h:175
pkgCache::DependencyData
information for a single dependency record
Definition pkgcache.h:738
pkgCache::DependencyData::CompareOp
map_flags_t CompareOp
comparison operator specified on the depends line
Definition pkgcache.h:752
pkgCache::DependencyData::Version
map_stringitem_t Version
string of the version the dependency is applied against
Definition pkgcache.h:740
pkgCache::DependencyData::Package
map_pointer< pkgCache::Package > Package
index of the package this depends applies to
Definition pkgcache.h:745
pkgCache::DependencyData::Type
map_number_t Type
Dependency type - Depends, Recommends, Conflicts, etc.
Definition pkgcache.h:748
pkgCache::Dependency
Definition pkgcache.h:757
pkgCache::Dependency::NextRevDepends
map_pointer< Dependency > NextRevDepends
next reverse dependency of this package
Definition pkgcache.h:762
pkgCache::Dependency::NextDepends
map_pointer< Dependency > NextDepends
next dependency of this version
Definition pkgcache.h:764
pkgCache::Dependency::ParentVer
map_pointer< Version > ParentVer
version of the package which has the depends
Definition pkgcache.h:760
pkgCache::Dependency::ID
map_id_t ID
unique sequel ID
Definition pkgcache.h:767
pkgCache::DescFile
associates a description with a Translation file
Definition pkgcache.h:607
pkgCache::DescFile::NextFile
map_pointer< DescFile > NextFile
next step in the linked list
Definition pkgcache.h:611
pkgCache::DescFile::Offset
map_filesize_t Offset
position in the file
Definition pkgcache.h:613
pkgCache::DescFile::Size
map_filesize_t Size
Definition pkgcache.h:615
pkgCache::DescFile::File
map_pointer< PackageFile > File
index of the file that this description was found in
Definition pkgcache.h:609
pkgCache::Description
datamember of a linked list of available description for a version
Definition pkgcache.h:707
pkgCache::Description::NextDesc
map_pointer< Description > NextDesc
next translation for this description
Definition pkgcache.h:722
pkgCache::Description::ParentPkg
map_pointer< Package > ParentPkg
the text is a description of this package
Definition pkgcache.h:724
pkgCache::Description::md5sum
map_stringitem_t md5sum
MD5sum of the original description.
Definition pkgcache.h:717
pkgCache::Description::ID
map_id_t ID
unique sequel ID
Definition pkgcache.h:727
pkgCache::Description::FileList
map_pointer< DescFile > FileList
Definition pkgcache.h:720
pkgCache::Description::language_code
map_stringitem_t language_code
Language code of this description (translation)
Definition pkgcache.h:712
pkgCache::Flag
Definition pkgcache.h:194
pkgCache::Flag::ProvidesFlags
ProvidesFlags
Definition pkgcache.h:205
pkgCache::Flag::ReleaseFileFlags
ReleaseFileFlags
Definition pkgcache.h:201
pkgCache::Flag::PkgFFlags
PkgFFlags
Definition pkgcache.h:196
pkgCache::Group
groups architecture depending packages together
Definition pkgcache.h:415
pkgCache::Group::Name
map_stringitem_t Name
Name of the group.
Definition pkgcache.h:417
pkgCache::Group::Next
map_pointer< Group > Next
Link to the next Group.
Definition pkgcache.h:426
pkgCache::Group::VersionsInSource
map_pointer< Version > VersionsInSource
List of binary produces by source package with this name.
Definition pkgcache.h:431
pkgCache::Group::FirstPackage
map_pointer< Package > FirstPackage
Link to the first package which belongs to the group.
Definition pkgcache.h:421
pkgCache::Group::LastPackage
map_pointer< Package > LastPackage
Link to the last package which belongs to the group.
Definition pkgcache.h:423
pkgCache::Group::d
map_pointer< void > d
Private pointer.
Definition pkgcache.h:434
pkgCache::Group::ID
map_id_t ID
unique sequel ID
Definition pkgcache.h:428
pkgCache::Header
Definition pkgcache.h:292
pkgCache::Header::HashTableSize
uint32_t HashTableSize
hash tables providing rapid group/package name lookup
Definition pkgcache.h:385
pkgCache::Header::MajorVersion
map_number_t MajorVersion
Definition pkgcache.h:300
pkgCache::Header::Signature
uint32_t Signature
Signature information.
Definition pkgcache.h:298
pkgCache::Header::Pools
DynamicMMap::Pool Pools[2 *12]
The Pool structures manage the allocation pools that the generator uses.
Definition pkgcache.h:373
pkgCache::Header::CacheFileSize
map_filesize_small_t CacheFileSize
Hash of the file (TODO: Rename)
Definition pkgcache.h:397
pkgCache::Header::HeaderSz
uint16_t HeaderSz
Size of structure values.
Definition pkgcache.h:316
pkgCache::Header::VerSysName
map_stringitem_t VerSysName
String representing the version system used.
Definition pkgcache.h:355
pkgCache::Header::MaxVerFileSize
map_filesize_t MaxVerFileSize
The maximum size of a raw entry from the original Package file.
Definition pkgcache.h:361
pkgCache::Header::MaxDescFileSize
map_filesize_t MaxDescFileSize
The maximum size of a raw entry from the original Translation file.
Definition pkgcache.h:363
pkgCache::Header::RlsFileList
map_pointer< ReleaseFile > RlsFileList
index of the first ReleaseFile structure
Definition pkgcache.h:352
pkgCache::Header::Architectures
map_stringitem_t Architectures
all architectures the cache was built against
Definition pkgcache.h:359
pkgCache::Header::Architecture
map_stringitem_t Architecture
native architecture the cache was built against
Definition pkgcache.h:357
pkgCache::Header::GroupCount
map_id_t GroupCount
Structure counts.
Definition pkgcache.h:334
pkgCache::Header::FileList
map_pointer< PackageFile > FileList
index of the first PackageFile structure
Definition pkgcache.h:350
pkgCache::Header::Dirty
bool Dirty
indicates if the cache should be erased
Definition pkgcache.h:307
pkgCache::PackageFile
stores information about the files used to generate the cache
Definition pkgcache.h:552
pkgCache::PackageFile::NextFile
map_pointer< PackageFile > NextFile
Link to the next PackageFile in the Cache.
Definition pkgcache.h:579
pkgCache::PackageFile::ID
map_fileid_t ID
unique sequel ID
Definition pkgcache.h:581
pkgCache::PackageFile::mtime
time_t mtime
Modification time for the file.
Definition pkgcache.h:572
pkgCache::PackageFile::FileName
map_stringitem_t FileName
physical disk file that this PackageFile represents
Definition pkgcache.h:554
pkgCache::PackageFile::Flags
map_flags_t Flags
Definition pkgcache.h:575
pkgCache::PackageFile::IndexType
map_stringitem_t IndexType
indicates what sort of index file this is
Definition pkgcache.h:564
pkgCache::PackageFile::Size
map_filesize_t Size
Size of the file.
Definition pkgcache.h:570
pkgCache::PackageFile::d
map_pointer< void > d
Private pointer.
Definition pkgcache.h:584
pkgCache::PackageFile::Release
map_pointer< ReleaseFile > Release
the release information
Definition pkgcache.h:556
pkgCache::Package
contains information for a single unique package
Definition pkgcache.h:450
pkgCache::Package::RevDepends
map_pointer< Dependency > RevDepends
List of all dependencies on this package.
Definition pkgcache.h:472
pkgCache::Package::CurrentState
map_number_t CurrentState
indicates if the package is installed
Definition pkgcache.h:486
pkgCache::Package::Arch
map_stringitem_t Arch
Architecture of the package.
Definition pkgcache.h:452
pkgCache::Package::VersionList
map_pointer< Version > VersionList
Base of a singly linked list of versions.
Definition pkgcache.h:462
pkgCache::Package::InstState
map_number_t InstState
installation state of the package
Definition pkgcache.h:484
pkgCache::Package::Group
map_pointer< pkgCache::Group > Group
index of the group this package belongs to
Definition pkgcache.h:466
pkgCache::Package::CurrentVer
map_pointer< Version > CurrentVer
index to the installed version
Definition pkgcache.h:464
pkgCache::Package::Flags
map_flags_t Flags
some useful indicators of the package's state
Definition pkgcache.h:496
pkgCache::Package::NextPackage
map_pointer< Package > NextPackage
Link to the next package in the same bucket.
Definition pkgcache.h:470
pkgCache::Package::SelectedState
map_number_t SelectedState
state that the user wishes the package to be in
Definition pkgcache.h:478
pkgCache::Package::d
map_pointer< void > d
Private pointer.
Definition pkgcache.h:499
pkgCache::Package::ProvidesList
map_pointer< Provides > ProvidesList
List of all "packages" this package provide.
Definition pkgcache.h:474
pkgCache::Package::ID
map_id_t ID
unique sequel ID
Definition pkgcache.h:494
pkgCache::Provides
handles virtual packages
Definition pkgcache.h:780
pkgCache::Provides::NextPkgProv
map_pointer< Provides > NextPkgProv
next provides (based of version)
Definition pkgcache.h:794
pkgCache::Provides::Version
map_pointer< pkgCache::Version > Version
index of the version this provide line applies to
Definition pkgcache.h:784
pkgCache::Provides::ParentPkg
map_pointer< Package > ParentPkg
index of the package providing this
Definition pkgcache.h:782
pkgCache::Provides::NextProvides
map_pointer< Provides > NextProvides
next provides (based of package)
Definition pkgcache.h:792
pkgCache::Provides::ProvideVersion
map_stringitem_t ProvideVersion
version in the provides line (if any)
Definition pkgcache.h:789
pkgCache::ReleaseFile
stores information about the release files used to generate the cache
Definition pkgcache.h:508
pkgCache::ReleaseFile::Archive
map_stringitem_t Archive
the release information
Definition pkgcache.h:515
pkgCache::ReleaseFile::ID
map_fileid_t ID
unique sequel ID
Definition pkgcache.h:539
pkgCache::ReleaseFile::Site
map_stringitem_t Site
The site the index file was fetched from.
Definition pkgcache.h:521
pkgCache::ReleaseFile::NextFile
map_pointer< ReleaseFile > NextFile
Link to the next ReleaseFile in the Cache.
Definition pkgcache.h:537
pkgCache::ReleaseFile::mtime
time_t mtime
Modification time for the file.
Definition pkgcache.h:530
pkgCache::ReleaseFile::FileName
map_stringitem_t FileName
physical disk file that this ReleaseFile represents
Definition pkgcache.h:510
pkgCache::ReleaseFile::Flags
map_flags_t Flags
Definition pkgcache.h:533
pkgCache::ReleaseFile::Size
map_filesize_t Size
Size of the file.
Definition pkgcache.h:528
pkgCache::ReleaseFile::d
map_pointer< void > d
Private pointer.
Definition pkgcache.h:542
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:593
pkgCache::VerFile::NextFile
map_pointer< VerFile > NextFile
next step in the linked list
Definition pkgcache.h:597
pkgCache::VerFile::Offset
map_filesize_t Offset
position in the package file
Definition pkgcache.h:599
pkgCache::VerFile::Size
map_filesize_t Size
Definition pkgcache.h:601
pkgCache::VerFile::File
map_pointer< PackageFile > File
index of the package file that this version was found in
Definition pkgcache.h:595
pkgCache::Version
information for a single version of a package
Definition pkgcache.h:625
pkgCache::Version::MultiArch
map_number_t MultiArch
stores the MultiArch capabilities of this version
Definition pkgcache.h:652
pkgCache::Version::VerStr
map_stringitem_t VerStr
complete version string
Definition pkgcache.h:629
pkgCache::Version::Priority
map_number_t Priority
parsed priority value
Definition pkgcache.h:688
pkgCache::Version::NextVer
map_pointer< Version > NextVer
next (lower or equal) version in the linked list
Definition pkgcache.h:662
pkgCache::Version::Section
map_stringitem_t Section
section this version is filled in
Definition pkgcache.h:631
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:634
pkgCache::Version::Hash
uint32_t Hash
characteristic value representing this version
Definition pkgcache.h:684
pkgCache::Version::InstalledSize
map_filesize_t InstalledSize
uncompressed size for this version
Definition pkgcache.h:679
pkgCache::Version::VerMultiArch
VerMultiArch
Multi-Arch capabilities of a package version.
Definition pkgcache.h:640
pkgCache::Version::Same
@ Same
Definition pkgcache.h:643
pkgCache::Version::Foreign
@ Foreign
Definition pkgcache.h:642
pkgCache::Version::Allowed
@ Allowed
Definition pkgcache.h:644
pkgCache::Version::All
@ All
Definition pkgcache.h:641
pkgCache::Version::No
@ No
Definition pkgcache.h:640
pkgCache::Version::Size
map_filesize_t Size
archive size for this version
Definition pkgcache.h:677
pkgCache::Version::ParentPkg
map_pointer< Package > ParentPkg
links to the owning package
Definition pkgcache.h:670
pkgCache::Version::NextInSource
map_pointer< Version > NextInSource
next version in the source package (might be different binary)
Definition pkgcache.h:690
pkgCache::Version::DependsList
map_pointer< Dependency > DependsList
base of the dependency list
Definition pkgcache.h:666
pkgCache::Version::ProvidesList
map_pointer< Provides > ProvidesList
list of pkgCache::Provides
Definition pkgcache.h:672
pkgCache::Version::ID
map_id_t ID
unique sequel ID
Definition pkgcache.h:686
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:637
pkgCache::Version::d
map_pointer< Extra > d
Private pointer.
Definition pkgcache.h:693
pkgCache::Version::FileList
map_pointer< VerFile > FileList
references all the PackageFile's that this version came from
Definition pkgcache.h:660
pkgCache::Version::DescriptionList
map_pointer< Description > DescriptionList
next description in the linked list
Definition pkgcache.h:664