apt 3.0.3
commandline package manager
Public Attributes | List of all members
pkgCache< Str, Itr >::Package Struct Reference

contains information for a single unique package More...

#include <apt-pkg/pkgcache.h>

Collaboration diagram for pkgCache< Str, Itr >::Package:
[legend]

Public Attributes

map_stringitem_t Arch
 Architecture of the package.
 
map_pointer< VersionVersionList
 Base of a singly linked list of versions.
 
map_pointer< VersionCurrentVer
 index to the installed version
 
map_pointer< pkgCache::GroupGroup
 index of the group this package belongs to
 
map_pointer< PackageNextPackage
 Link to the next package in the same bucket.
 
map_pointer< DependencyRevDepends
 List of all dependencies on this package.
 
map_pointer< ProvidesProvidesList
 List of all "packages" this package provide.
 
map_number_t SelectedState
 state that the user wishes the package to be in
 
map_number_t InstState
 installation state of the package
 
map_number_t CurrentState
 indicates if the package is installed
 
map_id_t ID
 unique sequel ID
 
map_flags_t Flags
 some useful indicators of the package's state
 
map_pointer< void > d
 Private pointer.
 

Detailed Description

template<typename Str, typename Itr>
struct pkgCache< Str, Itr >::Package

contains information for a single unique package

There can be any number of versions of a given package. Package exists in a singly linked list of package records starting at the hash index of the name in the pkgCache::Header::PkgHashTable

A package can be created for every architecture so package names are not unique, but it is guaranteed that packages with the same name are sequencel ordered in the list. Packages with the same name can be accessed with the Group.

Member Data Documentation

◆ ID

template<typename Str , typename Itr >
map_id_t ID

unique sequel ID

ID is a unique value from 0 to Header->PackageCount assigned by the generator. This allows clients to create an array of size PackageCount and use it to store state information for the package map. For instance the status file emitter uses this to track which packages have been emitted already.

Referenced by pkgDPkgPM::Go().

◆ InstState

template<typename Str , typename Itr >
map_number_t InstState

installation state of the package

This should be "ok" but in case the installation failed it will be different.

◆ VersionList

template<typename Str , typename Itr >
map_pointer<Version> VersionList

Base of a singly linked list of versions.

Each structure represents a unique version of the package. The version structures contain links into PackageFile and the original text file as well as detailed information about the size and dependencies of the specific package. In this way multiple versions of a package can be cleanly handled by the system. Furthermore, this linked list is guaranteed to be sorted from Highest version to lowest version with no duplicate entries.


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