refactor onError relabeling of DestFile as '.FAILED'
authorDavid Kalnischkies <kalnischkies@gmail.com>
Wed, 2 Oct 2013 23:12:18 +0000 (01:12 +0200)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Wed, 2 Oct 2013 23:12:18 +0000 (01:12 +0200)
commit3c8030a4977536e9d3a1954adc68082ae1c6d5a2
treeb9f24a6273c86f71606550a6589a8bf50ad4ec3a
parent18908589a096719eb4ce76123596865093d6ff9d
refactor onError relabeling of DestFile as '.FAILED'

This helps ensure three things:
- each error is reported via ReportMirrorFailure
- if DestFile doesn't exist, do not attempt rename
- renames happen for every error

The last one wasn't the case for Size mismatches, which isn't nice, but
not a exploitable problem per-se as the file isn't picked up and remains
in partial/ where the following download-try will at most take it for a
partial request which fails the hashsum verification later on

Git-Dch: Ignore
apt-pkg/acquire-item.cc
apt-pkg/acquire-item.h