summaryrefslogtreecommitdiff
path: root/apt-private/acqprogress.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-private/acqprogress.cc')
-rw-r--r--apt-private/acqprogress.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/apt-private/acqprogress.cc b/apt-private/acqprogress.cc
index 0f5b53e50..14a53eacb 100644
--- a/apt-private/acqprogress.cc
+++ b/apt-private/acqprogress.cc
@@ -64,8 +64,6 @@ void AcqTextStatus::IMSHit(pkgAcquire::ItemDesc &Itm)
cout << '\r' << BlankLine << '\r';
cout << _("Hit ") << Itm.Description;
- if (Itm.Owner->FileSize != 0)
- cout << " [" << SizeToStr(Itm.Owner->FileSize) << "B]";
cout << endl;
Update = true;
}
@@ -119,6 +117,9 @@ void AcqTextStatus::Fail(pkgAcquire::ItemDesc &Itm)
if (Itm.Owner->Status == pkgAcquire::Item::StatDone)
{
cout << _("Ign ") << Itm.Description << endl;
+ if (Itm.Owner->ErrorText.empty() == false &&
+ _config->FindB("Acquire::Progress::Ignore::ShowErrorText", false) == true)
+ cout << " " << Itm.Owner->ErrorText << endl;
}
else
{
@@ -142,6 +143,9 @@ void AcqTextStatus::Stop()
if (Quiet <= 0)
cout << '\r' << BlankLine << '\r' << flush;
+ if (_config->FindB("quiet::NoStatistic", false) == true)
+ return;
+
if (FetchedBytes != 0 && _error->PendingError() == false)
ioprintf(cout,_("Fetched %sB in %s (%sB/s)\n"),
SizeToStr(FetchedBytes).c_str(),
@@ -170,7 +174,7 @@ bool AcqTextStatus::Pulse(pkgAcquire *Owner)
ScreenWidth = sizeof(Buffer)-1;
// Put in the percent done
- sprintf(S,"%.0f%%",((CurrentBytes + CurrentItems)*100.0)/(TotalBytes+TotalItems));
+ sprintf(S,"%.0f%%", Percent);
bool Shown = false;
for (pkgAcquire::Worker *I = Owner->WorkersBegin(); I != 0;
@@ -201,9 +205,9 @@ bool AcqTextStatus::Pulse(pkgAcquire *Owner)
S += strlen(S);
// Show the short mode string
- if (I->CurrentItem->Owner->Mode != 0)
+ if (I->CurrentItem->Owner->ActiveSubprocess.empty() == false)
{
- snprintf(S,End-S," %s",I->CurrentItem->Owner->Mode);
+ snprintf(S,End-S, " %s", I->CurrentItem->Owner->ActiveSubprocess.c_str());
S += strlen(S);
}