summaryrefslogtreecommitdiff
path: root/apt-private
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2019-04-29 20:05:38 +0200
committerJulian Andres Klode <julian.klode@canonical.com>2019-04-30 17:40:38 +0200
commitcccef6ca60c2775e918d964fdad1afc1dcad4d0e (patch)
tree80c39c44bf749e37788748d2485c2ce5a29d6c7b /apt-private
parent46ef1a3e8c8895c53ff1e4787dc96d4f6c5dba27 (diff)
acq: worker: Move CurrentSize, TotalSize, ResumePoint to CurrentItem
These status fields belong to the current item, move them there. This prepares us for eventually having multiple current items.
Diffstat (limited to 'apt-private')
-rw-r--r--apt-private/acqprogress.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/apt-private/acqprogress.cc b/apt-private/acqprogress.cc
index 6cf200f5b..b37934cd4 100644
--- a/apt-private/acqprogress.cc
+++ b/apt-private/acqprogress.cc
@@ -221,21 +221,21 @@ bool AcqTextStatus::Pulse(pkgAcquire *Owner)
enum {Long = 0,Medium,Short} Mode = Medium;
// Add the current progress
if (Mode == Long)
- S << " " << std::to_string(I->CurrentSize);
+ S << " " << std::to_string(I->CurrentItem->CurrentSize);
else
{
- if (Mode == Medium || I->TotalSize == 0)
- S << " " << SizeToStr(I->CurrentSize) << "B";
+ if (Mode == Medium || I->CurrentItem->TotalSize == 0)
+ S << " " << SizeToStr(I->CurrentItem->CurrentSize) << "B";
}
// Add the total size and percent
- if (I->TotalSize > 0 && I->CurrentItem->Owner->Complete == false)
+ if (I->CurrentItem->TotalSize > 0 && I->CurrentItem->Owner->Complete == false)
{
if (Mode == Short)
- ioprintf(S, " %.0f%%", (I->CurrentSize*100.0)/I->TotalSize);
+ ioprintf(S, " %.0f%%", (I->CurrentItem->CurrentSize*100.0)/I->CurrentItem->TotalSize);
else
- ioprintf(S, "/%sB %.0f%%", SizeToStr(I->TotalSize).c_str(),
- (I->CurrentSize*100.0)/I->TotalSize);
+ ioprintf(S, "/%sB %.0f%%", SizeToStr(I->CurrentItem->TotalSize).c_str(),
+ (I->CurrentItem->CurrentSize*100.0)/I->CurrentItem->TotalSize);
}
S << "]";
}