Browse Source

revert file-hash based action-merging in acquire

Introduced in 9d2a8a7388 apt tries to
merge actions like downloading the same (as judged by hashes) file
into doing it once. The implementation was very simple in that it isn't
planing at all. Turns out that it works 90% of the time just fine, but
has issues in more complicated situations in which items can be in
different stages downloading different files emitting potentially the
"wrong" hash – like while pdiffs are worked on we might end up copying
the patch instead of the result file giving us very strange errors in
return. Reverting the change until we can implement a better planing
solution seems to be the best course of action even if its sad.

Closes: 810046
tags/debian/1.2
David Kalnischkies 5 years ago
parent
commit
feb674aba5
2 changed files with 1 additions and 2 deletions
  1. +1
    -2
      apt-pkg/acquire.cc
  2. +0
    -0
      test/integration/skip-acquire-same-repository-multiple-times

+ 1
- 2
apt-pkg/acquire.cc View File

@@ -839,9 +839,8 @@ bool pkgAcquire::Queue::Enqueue(ItemDesc &Item)
{
QItem **I = &Items;
// move to the end of the queue and check for duplicates here
HashStringList const hsl = Item.Owner->GetExpectedHashes();
for (; *I != 0; I = &(*I)->Next)
if (Item.URI == (*I)->URI || hsl == (*I)->Owner->GetExpectedHashes())
if (Item.URI == (*I)->URI)
{
if (_config->FindB("Debug::pkgAcquire::Worker",false) == true)
std::cerr << " @ Queue: Action combined for " << Item.URI << " and " << (*I)->URI << std::endl;


test/integration/test-acquire-same-repository-multiple-times → test/integration/skip-acquire-same-repository-multiple-times View File


Loading…
Cancel
Save