diff options
author | Julian Andres Klode <jak@debian.org> | 2016-09-02 22:38:34 +0200 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2016-09-02 22:38:34 +0200 |
commit | 969d33307ae0cc1b433a0462ef1561580ea6ddbc (patch) | |
tree | 0322cf6e3a82a1536c4516e8729993ce68af57af /apt-pkg/acquire-item.cc | |
parent | f6c10fb46d1193b8181b5846538e2cf7c15ff216 (diff) | |
parent | 54dd6baaf16e92c83f63bdb3633df6e603ac19f3 (diff) |
Merge tag '1.3_rc4' into ubuntu/master
apt Debian release 1.3~rc4
Diffstat (limited to 'apt-pkg/acquire-item.cc')
-rw-r--r-- | apt-pkg/acquire-item.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 0e1614330..bf1c68d82 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -1019,6 +1019,28 @@ bool pkgAcquire::Item::IsRedirectionLoop(std::string const &NewURI) /*{{{*/ } /*}}}*/ + /*}}}*/ +int pkgAcquire::Item::Priority() /*{{{*/ +{ + // Stage 1: Meta indices and diff indices + // - those need to be fetched first to have progress reporting working + // for the rest + if (dynamic_cast<pkgAcqMetaSig*>(this) != nullptr + || dynamic_cast<pkgAcqMetaBase*>(this) != nullptr + || dynamic_cast<pkgAcqDiffIndex*>(this) != nullptr) + return 1000; + // Stage 2: Diff files + // - fetch before complete indexes so we can apply the diffs while fetching + // larger files. + if (dynamic_cast<pkgAcqIndexDiffs*>(this) != nullptr || + dynamic_cast<pkgAcqIndexMergeDiffs*>(this) != nullptr) + return 800; + + // Stage 3: The rest - complete index files and other stuff + return 500; +} + /*}}}*/ + pkgAcqTransactionItem::pkgAcqTransactionItem(pkgAcquire * const Owner, /*{{{*/ pkgAcqMetaClearSig * const transactionManager, IndexTarget const &target) : pkgAcquire::Item(Owner), d(NULL), Target(target), TransactionManager(transactionManager) |