]> git.saurik.com Git - apt.git/commit
do fail on weakhash/loop earlier in acquire
authorDavid Kalnischkies <david@kalnischkies.de>
Wed, 24 Aug 2016 07:47:48 +0000 (09:47 +0200)
committerDavid Kalnischkies <david@kalnischkies.de>
Wed, 24 Aug 2016 08:24:41 +0000 (10:24 +0200)
commit2e2865ae53a65c00dd55a892d5b48458f3110366
tree75547baee53574ba399f179b7a62ab651e8cf7c0
parentac103d45f63bd9a57ff867a52c7c95616f6daf51
do fail on weakhash/loop earlier in acquire

The bugreport shows a segfault caused by the code not doing the correct
magical dance to remove an item from inside a queue in all cases. We
could try hard to fix this, but it is actually better and also easier to
perform these checks (which cause instant failure) earlier so that they
haven't entered queue(s) yet, which in return makes cleanup trivial.

The result is that we actually end up failing "too early" as if we
wouldn't be careful download errors would be logged before that process
was even started. Not a problem for the acquire system, but likely to
confuse users and programs alike if they see the download process
producing errors before apt was technically allowed to do an acquire
(it didn't, so no violation, but it looks like it to the untrained eye).

Closes: 835195
apt-pkg/acquire-item.cc
apt-pkg/acquire-worker.cc
apt-pkg/acquire.cc
test/integration/framework
test/integration/test-apt-redirect-loop
test/integration/test-bug-605394-versioned-or-groups
test/integration/test-bug-722207-print-uris-even-if-very-quiet
test/integration/test-handle-redirect-as-used-mirror-change