apt: pkgAcqMetaBase Class Reference

apt 2.7.6 commandline package manager

Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
pkgAcqMetaBase Class Reference
Acquire system {{{

the manager of a transaction More...

`#include <apt-pkg/acquire-item.h>`

Inheritance diagram for pkgAcqMetaBase:

## Public Member Functions
virtual bool | QueueURI (pkgAcquire::ItemDesc &Item) APT_OVERRIDE
virtual HashStringList | GetExpectedHashes () const APT_OVERRIDE
virtual bool | HashesRequired () const APT_OVERRIDE
void | Add (pkgAcqTransactionItem *const I)
void | AbortTransaction ()
bool | TransactionHasError () const
void | CommitTransaction ()
void | TransactionStageCopy (pkgAcqTransactionItem *const I, const std::string &From, const std::string &To)
| Stage (queue) a copy action when the transaction is committed.
void | TransactionStageRemoval (pkgAcqTransactionItem *const I, const std::string &FinalFile)
| Stage (queue) a removal action when the transaction is committed.
virtual std::string | GetFinalFilename () const APT_OVERRIDE
| Get the full pathname of the final file for the current URI.
| pkgAcqMetaBase (pkgAcquire *const Owner, pkgAcqMetaClearSig *const TransactionManager, IndexTarget const &DataTarget) APT_NONNULL(2
Public Member Functions inherited from pkgAcqTransactionItem
virtual std::string | DescURI () const APT_OVERRIDE
virtual std::string | GetMetaKey () const
virtual bool | AcquireByHash () const
| pkgAcqTransactionItem (pkgAcquire *const Owner, pkgAcqMetaClearSig *const TransactionManager, IndexTarget const &Target) APT_NONNULL(2

## Public Attributes
bool | IMSHit
TransactionStates | State
std::string | BaseURI
Public Attributes inherited from pkgAcqTransactionItem
IndexTarget const | Target
std::string | PartialFile
| storge name until a transaction is finished
pkgAcqMetaClearSig *const | TransactionManager
| TransactionManager.

## Protected Member Functions
bool | CheckDownloadDone (pkgAcqTransactionItem *const I, const std::string &Message, HashStringList const &Hashes) const
| Called when a file is finished being retrieved.
void | QueueForSignatureVerify (pkgAcqTransactionItem *const I, std::string const &File, std::string const &Signature)
| Queue the downloaded Signature for verification.
virtual std::string | Custom600Headers () const APT_OVERRIDE
bool | CheckAuthDone (std::string const &Message, pkgAcquire::MethodConfig const *const Cnf)
| Called when authentication succeeded.
bool | CheckStopAuthentication (pkgAcquire::Item *const I, const std::string &Message)
bool | VerifyVendor (std::string const &Message)
| Check that the release file is a release file for the correct distribution.
virtual bool | TransactionState (TransactionStates const state) APT_OVERRIDE
Protected Member Functions inherited from pkgAcqTransactionItem
HashStringList | GetExpectedHashesFor (std::string const &MetaKey) const
bool | QueueURI (pkgAcquire::ItemDesc &Item) APT_OVERRIDE

## Protected Attributes
std::vector< pkgAcqTransactionItem * > | Transaction
bool | AuthPass
| If true, the index's signature is currently being verified.

## Additional Inherited Members
Public Types inherited from pkgAcqTransactionItem
enum | TransactionStates { TransactionStarted , TransactionCommit , TransactionAbort }

## Detailed Description

the manager of a transaction

## Member Function Documentation

## ◆ CheckAuthDone()

bool CheckAuthDone | ( | std::string const & | Message,
|  | pkgAcquire::MethodConfig const *const | Cnf
| ) |  |
| protected

Called when authentication succeeded.

Sanity-checks the authenticated file, queues up the individual index files for download, and saves the signature in the lists directory next to the authenticated list file.

Parameters

  Message | The message block received from the fetch subprocess.
  Cnf | The method and its configuration which handled the request

References IndexTarget::Description, GetFinalFilename(), pkgAcqMetaClearSig::MetaIndexParser, pkgAcqMetaClearSig::QueueIndexes(), pkgAcqTransactionItem::TransactionManager, IndexTarget::URI, and VerifyVendor().

## ◆ CheckDownloadDone()

bool CheckDownloadDone | ( | pkgAcqTransactionItem *const | I,
|  | const std::string & | Message,
|  | HashStringList const & | Hashes
| ) |  | const
| protected

Called when a file is finished being retrieved.

If the file was not downloaded to DestFile, a copy process is set up to copy it to DestFile; otherwise, Complete is set to true and the file is moved to its final location.

Parameters

  Message | The message block received from the fetch subprocess.

References pkgAcqTransactionItem::TransactionManager.

## ◆ CheckStopAuthentication()

bool CheckStopAuthentication | ( | pkgAcquire::Item *const | I,
|  | const std::string & | Message
| ) |  |
| protected

Check if the current item should fail at this point

Referenced by pkgAcqMetaSig::Failed().

## ◆ GetExpectedHashes()

HashStringList GetExpectedHashes | ( |  | ) | const
| virtual

Reimplemented from pkgAcqTransactionItem.

## ◆ HashesRequired()

APT_PURE bool HashesRequired | ( |  | ) | const
| virtual

Reimplemented from pkgAcqTransactionItem.

## ◆ TransactionState()

bool TransactionState | ( | TransactionStates const | state | ) |
| protectedvirtual

Reimplemented from pkgAcqTransactionItem.

## ◆ VerifyVendor()

bool VerifyVendor | ( | std::string const & | Message | ) |
| protected

Check that the release file is a release file for the correct distribution.

Returns
  true if no fatal errors were encountered.

References GetFinalFilename(), pkgAcquire::Log, pkgAcqMetaClearSig::MetaIndexParser, pkgAcqTransactionItem::PartialFile, pkgAcquireStatus::ReleaseInfoChanges(), pkgAcqTransactionItem::TransactionManager, and IndexTarget::URI.

Referenced by CheckAuthDone(), and pkgAcqMetaSig::Failed().

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

- apt-pkg/acquire-item.h
- apt-pkg/acquire-item.cc