summaryrefslogtreecommitdiffstats
path: root/apt-pkg/contrib/progress.cc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-23 04:10:52 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-23 04:10:52 +0000
commit85f9a2650850b181208492de61822cf840ee62e5 (patch)
treef2ba509bc1f23e871c5e0e9d569fb82c68280e50 /apt-pkg/contrib/progress.cc
parentReleasing progress-linux version 2.9.1-0.0~progress7.99u1. (diff)
downloadapt-85f9a2650850b181208492de61822cf840ee62e5.tar.xz
apt-85f9a2650850b181208492de61822cf840ee62e5.zip
Merging upstream version 2.9.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'apt-pkg/contrib/progress.cc')
-rw-r--r--apt-pkg/contrib/progress.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/apt-pkg/contrib/progress.cc b/apt-pkg/contrib/progress.cc
index df068e4..5f440a7 100644
--- a/apt-pkg/contrib/progress.cc
+++ b/apt-pkg/contrib/progress.cc
@@ -156,12 +156,12 @@ void OpTextProgress::Done()
char S[300] = {};
if (_error->PendingError() == true)
snprintf(S,sizeof(S),_("%c%s... Error!"),'\r',OldOp.c_str());
- else if (not _config->FindB("APT::Internal::OpProgress::EraseLines", true))
+ else if (not _config->FindB("APT::Internal::OpProgress::EraseLines", _config->FindI("APT::Output-Version") >= 30))
snprintf(S,sizeof(S),_("%c%s... Done"),'\r',OldOp.c_str());
Write(S);
// FIXME: apt-cdrom relies on this end of line being printed
- if (_error->PendingError() || not _config->FindB("APT::Internal::OpProgress::EraseLines", true))
- cout << endl;
+ if (_error->PendingError() || not _config->FindB("APT::Internal::OpProgress::EraseLines", _config->FindI("APT::Output-Version") >= 30))
+ cout << endl;
OldOp = string();
}
@@ -202,8 +202,8 @@ void OpTextProgress::Update()
{
snprintf(S,sizeof(S),"\r%s",OldOp.c_str());
Write(S);
- if (_config->FindB("APT::Internal::OpProgress::EraseLines", true))
- cout << endl;
+ if (_config->FindB("APT::Internal::OpProgress::EraseLines", _config->FindI("APT::Output-Version") >= 30))
+ cout << endl;
}
// Print the spinner. Absolute progress shows us a time progress.