apt 3.1.11 commandline package manager

Public Attributes | List of all members
pkgCache::Package Struct Reference

contains information for a single unique package More...

`#include <apt-pkg/pkgcache.h>`

## Public Attributes
map_stringitem_t | Arch
| Architecture of the package.
map_pointer< Version > | VersionList
| Base of a singly linked list of versions.
map_pointer< Version > | CurrentVer
| index to the installed version
map_pointer< pkgCache::Group > | Group
| index of the group this package belongs to
map_pointer< Package > | NextPackage
| Link to the next package in the same bucket.
map_pointer< Dependency > | RevDepends
| List of all dependencies on this package.
map_pointer< Provides > | ProvidesList
| 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

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

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

map_number_t InstState

installation state of the package

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

## ◆ VersionList

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:

- apt-pkg/pkgcache.h