apt 3.1.11 commandline package manager

Public Member Functions | Public Attributes | List of all members
pkgCache::Header Struct Reference

## Public Member Functions
uint32_t | GetHashTableSize () const
void | SetHashTableSize (unsigned int const sz)
map_stringitem_t | GetArchitectures () const
void | SetArchitectures (map_stringitem_t const idx)
bool | CheckSizes (Header &Against) const APT_PURE

## Public Attributes
uint32_t | Signature
| Signature information.
map_number_t | MajorVersion
map_number_t | MinorVersion
bool | Dirty
| indicates if the cache should be erased
uint16_t | HeaderSz
| Size of structure values.
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
| Structure counts.
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
| index of the first PackageFile structure
map_pointer< ReleaseFile > | RlsFileList
| index of the first ReleaseFile structure
map_stringitem_t | VerSysName
| String representing the version system used.
map_stringitem_t | Architecture
| native architecture the cache was built against
map_stringitem_t | Architectures
| all architectures the cache was built against
map_filesize_t | MaxVerFileSize
| The maximum size of a raw entry from the original Package file.
map_filesize_t | MaxDescFileSize
| The maximum size of a raw entry from the original Translation file.
DynamicMMap::Pool | Pools [2 *13]
| The Pool structures manage the allocation pools that the generator uses.
uint32_t | HashTableSize
| hash tables providing rapid group/package name lookup
map_filesize_small_t | CacheFileSize
| Hash of the file (TODO: Rename).

## Member Data Documentation

## ◆ Dirty

bool Dirty

indicates if the cache should be erased

Dirty is true if the cache file was opened for reading, the client expects to have written things to it and have not fully synced it. The file should be erased and rebuilt if it is true.

## ◆ FileList

map_pointer<PackageFile> FileList

index of the first PackageFile structure

The PackageFile structures are singly linked lists that represent all package files that have been merged into the cache.

## ◆ GroupCount

map_id_t GroupCount

Structure counts.

These indicate the number of each structure contained in the cache. PackageCount is especially useful for generating user state structures. See Package::Id for more info.

## ◆ HashTableSize

uint32_t HashTableSize

hash tables providing rapid group/package name lookup

Each group/package name is inserted into a hash table using pkgCache::Hash(const &string) By iterating over each entry in the hash table it is possible to iterate over the entire list of packages. Hash Collisions are handled with a singly linked list of packages based at the hash item. The linked list contains only packages that match the hashing function. In the PkgHashTable is it possible that multiple packages have the same name - these packages are stored as a sequence in the list. The size of both tables is the same.

## ◆ HeaderSz

uint16_t HeaderSz

Size of structure values.

All *Sz variables contains the sizeof() that particular structure. It is used as an extra consistency check on the structure of the file.

If any of the size values do not exactly match what the client expects then the client should refuse the load the file.

## ◆ MajorVersion

map_number_t MajorVersion

These contain the version of the cache file

## ◆ Pools

DynamicMMap::Pool Pools[2 *13]

The Pool structures manage the allocation pools that the generator uses.

Start indicates the first byte of the pool, Count is the number of objects remaining in the pool and ItemSize is the structure size (alignment factor) of the pool. An ItemSize of 0 indicates the pool is empty. There should be twice the number of pools as there are non-private structure types. The generator stores this information so future additions can make use of any unused pool blocks.

## ◆ Signature

uint32_t Signature

Signature information.

This must contain the hex value 0x98FE76DC which is designed to verify that the system loading the image has the same byte order and byte size as the system saving the image

The documentation for this struct was generated from the following files:

- apt-pkg/pkgcache.h
- apt-pkg/pkgcache.cc