diff options
author | Michael Vogt <mvo@ubuntu.com> | 2014-10-07 22:36:09 +0200 |
---|---|---|
committer | Michael Vogt <mvo@ubuntu.com> | 2014-10-07 22:36:09 +0200 |
commit | ee27950632c149bb14c9c490e92147579ba4fc2a (patch) | |
tree | 2ad71178166534b7ebfd2813e7376139e1ec0de6 /apt-pkg | |
parent | 27e6c17a18216e2a02de39a6d1722b83ac823d42 (diff) |
Send "Fail-Reason: MaximumSizeExceeded" from the method
Communicate the fail reason from the methods to the parent
and Rename() failed files.
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/acquire-item.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 1dcbde223..f630129b9 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -148,8 +148,12 @@ void pkgAcquire::Item::Failed(string Message,pkgAcquire::MethodConfig *Cnf) else Status = StatIdle; - // report mirror failure back to LP if we actually use a mirror + // check fail reason string FailReason = LookupTag(Message, "FailReason"); + if(FailReason == "MaximumSizeExceeded") + Rename(DestFile, DestFile+".FAILED"); + + // report mirror failure back to LP if we actually use a mirror if(FailReason.size() != 0) ReportMirrorFailure(FailReason); else |