|
apt 3.0.3
commandline package manager
|
An item that is responsible for fetching server-merge patches {{{ that need to be applied to a given package index file. More...
#include <apt-pkg/acquire-item.h>
Public Member Functions | |
| void | Failed (std::string const &Message, pkgAcquire::MethodConfig const *Cnf) override |
| Called when the patch file failed to be downloaded. | |
| void | Done (std::string const &Message, HashStringList const &Hashes, pkgAcquire::MethodConfig const *Cnf) override |
| std::string | Custom600Headers () const override |
| std::string | DescURI () const override |
| HashStringList | GetExpectedHashes () const override |
| bool | HashesRequired () const override |
| bool | AcquireByHash () const override |
| pkgAcqIndexDiffs (pkgAcquire *const Owner, pkgAcqMetaClearSig *const TransactionManager, IndexTarget const &Target, std::vector< DiffInfo > const &diffs=std::vector< DiffInfo >()) APT_NONNULL(2 | |
| Create an index diff item. | |
Public Member Functions inherited from pkgAcqBaseIndex | |
| std::string | GetFinalFilename () const override |
| Get the full pathname of the final file for the current URI. | |
| void | Failed (std::string const &Message, pkgAcquire::MethodConfig const *Cnf) 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) |
| std::string | DescURI () const override |
| HashStringList | GetExpectedHashes () const override |
| virtual std::string | GetMetaKey () const |
| bool | HashesRequired () const override |
| pkgAcqTransactionItem (pkgAcquire *const Owner, pkgAcqMetaClearSig *const TransactionManager, IndexTarget const &Target) APT_NONNULL(2 | |
Protected Types | |
| enum | DiffState { StateFetchDiff , StateApplyDiff } |
Protected Attributes | |
| bool | Debug |
| If true, debugging output will be written to std::clog. | |
| std::vector< DiffInfo > | available_patches |
| enum pkgAcqIndexDiffs::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) override |
An item that is responsible for fetching server-merge patches {{{ that need to be applied to a given package index file.
After downloading and applying a single patch, this item will enqueue a new pkgAcqIndexDiffs to download and apply the remaining patches. If no patch can be found that applies to an intermediate file or if one of the patches cannot be downloaded, falls back to downloading the entire package index file using pkgAcqIndex.
|
protected |
| pkgAcqIndexDiffs | ( | pkgAcquire *const | Owner, |
| pkgAcqMetaClearSig *const | TransactionManager, | ||
| IndexTarget const & | Target, | ||
| std::vector< DiffInfo > const & | diffs = std::vector<DiffInfo>() |
||
| ) |
Create an index diff item.
After filling in its basic fields, this invokes Finish(true) if diffs is empty, or QueueNextDiff() otherwise.
| Owner | The pkgAcquire object that owns this item. |
| TransactionManager | responsible for this item |
| Target | we want to built via pdiff patching |
| baseURI | is the URI used for the Index, but stripped down to Target |
| diffs | The remaining diffs from the index of diffs. They should be ordered so that each diff appears before any diff that depends on it. |
References available_patches, Debug, IndexTarget::ShortDesc, StateFetchDiff, and IndexTarget::URI.
|
overridevirtual |
Reimplemented from pkgAcqTransactionItem.
|
override |
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.
References Debug, pkgAcqTransactionItem::TransactionManager, and IndexTarget::URI.
|
protected |
The patches that remain to be downloaded, including the patch being downloaded right now. This list should be ordered so that each diff appears before any diff that depends on it.
Referenced by pkgAcqIndexDiffs().