]> git.saurik.com Git - apt.git/blobdiff - apt-private/acqprogress.cc
use a abi version check similar to the gcc check
[apt.git] / apt-private / acqprogress.cc
index 0f5b53e500666ff7d48ec48085cfa7fdb9480de3..14a53eacb495e61078baf2d36a542e4bbb0184a2 100644 (file)
@@ -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);
       }