apt: pkgAcqIndexMergeDiffs Class Reference

apt 2.9.8 commandline package manager

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

An item that is responsible for fetching client-merge patches {{{ that need to be applied to a given package index file. More...

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

Inheritance diagram for pkgAcqIndexMergeDiffs:

## Public Member Functions
virtual void | Failed (std::string const &Message, pkgAcquire::MethodConfig const *const Cnf) APT_OVERRIDE
| Called when the patch file failed to be downloaded.
virtual void | Done (std::string const &Message, HashStringList const &Hashes, pkgAcquire::MethodConfig const *const Cnf) APT_OVERRIDE
virtual std::string | Custom600Headers () const APT_OVERRIDE
virtual std::string | DescURI () const APT_OVERRIDE
virtual HashStringList | GetExpectedHashes () const APT_OVERRIDE
virtual bool | HashesRequired () const APT_OVERRIDE
virtual bool | AcquireByHash () const APT_OVERRIDE
| pkgAcqIndexMergeDiffs (pkgAcquire *const Owner, pkgAcqMetaClearSig *const TransactionManager, IndexTarget const &Target, DiffInfo const &patch, std::vector< pkgAcqIndexMergeDiffs * > const *const allPatches) APT_NONNULL(2
| Create an index merge-diff item.
Public Member Functions inherited from pkgAcqBaseIndex
virtual std::string | GetFinalFilename () const APT_OVERRIDE
| Get the full pathname of the final file for the current URI.
virtual void | Failed (std::string const &Message, pkgAcquire::MethodConfig const *const Cnf) APT_OVERRIDE
| pkgAcqBaseIndex (pkgAcquire *const Owner, pkgAcqMetaClearSig *const TransactionManager, IndexTarget const &Target) APT_NONNULL(2
Public Member Functions inherited from pkgAcqTransactionItem
virtual bool | TransactionState (TransactionStates const state)
virtual std::string | DescURI () const APT_OVERRIDE
virtual HashStringList | GetExpectedHashes () const APT_OVERRIDE
virtual std::string | GetMetaKey () const
virtual bool | HashesRequired () const APT_OVERRIDE
virtual bool | AcquireByHash () const
| pkgAcqTransactionItem (pkgAcquire *const Owner, pkgAcqMetaClearSig *const TransactionManager, IndexTarget const &Target) APT_NONNULL(2

## Protected Types
enum | DiffState { StateFetchDiff , StateApplyDiff , StateDoneDiff , StateErrorDiff }

## Protected Attributes
bool | Debug
| If true, debugging output will be written to std::clog.
struct DiffInfo const | patch
| information about the current patch
std::vector< pkgAcqIndexMergeDiffs * > const *const | allPatches
| list of all download items for the patches
enum pkgAcqIndexMergeDiffs::DiffState | State

## Additional Inherited Members
Public Types inherited from pkgAcqTransactionItem
enum | TransactionStates { TransactionStarted , TransactionCommit , TransactionAbort }
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 inherited from pkgAcqTransactionItem
HashStringList | GetExpectedHashesFor (std::string const &MetaKey) const
bool | QueueURI (pkgAcquire::ItemDesc &Item) APT_OVERRIDE

## Detailed Description

An item that is responsible for fetching client-merge patches {{{ that need to be applied to a given package index file.

Instead of downloading and applying each patch one by one like its sister pkgAcqIndexDiffs this class will download all patches at once and call rred with all the patches downloaded once. Rred will then merge and apply them in one go, which should be a lot faster – but is incompatible with server-based merges of patches like reprepro can do.

See also
  pkgAcqDiffIndex, pkgAcqIndex

## Member Enumeration Documentation

## ◆ DiffState

enum DiffState
| protected

The current status of this patch.

Enumerator
StateFetchDiff | The diff is currently being fetched.
StateApplyDiff | The diff is currently being applied.
StateDoneDiff | the work with this diff is done
StateErrorDiff | something bad happened and fallback was triggered

## Constructor & Destructor Documentation

## ◆ pkgAcqIndexMergeDiffs()

pkgAcqIndexMergeDiffs | ( | pkgAcquire *const | Owner,
|  | pkgAcqMetaClearSig *const | TransactionManager,
|  | IndexTarget const & | Target,
|  | DiffInfo const & | patch,
|  | std::vector< pkgAcqIndexMergeDiffs * > const *const | allPatches
| ) |  |

Create an index merge-diff item.

Parameters

  Owner | The pkgAcquire object that owns this item.
  TransactionManager | responsible for this item
  Target | we intend to built via pdiff patching
  baseURI | is the URI used for the Index, but stripped down to Target
  DiffInfo | of the patch in question
  patch | contains infos about the patch this item is supposed to download which were read from the index
  allPatches | contains all related items so that each item can check if it was the last one to complete the download step

References Debug, IndexTarget::Description, DiffInfo::file, patch, IndexTarget::ShortDesc, and IndexTarget::URI.

## Member Function Documentation

## ◆ AcquireByHash()

bool AcquireByHash | ( |  | ) | const
| virtual

Reimplemented from pkgAcqTransactionItem.

## ◆ DescURI()

virtual std::string DescURI | ( |  | ) | const
| inlinevirtual

Reimplemented from pkgAcqTransactionItem.

## ◆ Failed()

void Failed | ( | std::string const & | Message,
|  | pkgAcquire::MethodConfig const *const | Cnf
| ) |  |
| virtual

Called when the patch file failed to be downloaded.

This method will fall back to downloading the whole index file outright; its arguments are ignored.

Reimplemented from pkgAcqBaseIndex.

References allPatches, Debug, StateDoneDiff, StateErrorDiff, pkgAcqTransactionItem::TransactionManager, and IndexTarget::URI.

## ◆ GetExpectedHashes()

HashStringList GetExpectedHashes | ( |  | ) | const
| virtual

Reimplemented from pkgAcqTransactionItem.

## ◆ HashesRequired()

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

Reimplemented from pkgAcqTransactionItem.

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

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