diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 10:18:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 10:18:28 +0000 |
commit | 3e0e6581dd3d3a453b60d6acd3ca3147c715c456 (patch) | |
tree | be274b0772a30fcb2a94e350e531317f4682d833 /apt-pkg | |
parent | Adding debian version 2.7.14. (diff) | |
download | apt-3e0e6581dd3d3a453b60d6acd3ca3147c715c456.tar.xz apt-3e0e6581dd3d3a453b60d6acd3ca3147c715c456.zip |
Merging upstream version 2.9.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | apt-pkg/contrib/progress.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/apt-pkg/contrib/progress.cc b/apt-pkg/contrib/progress.cc index a2c4332..df068e4 100644 --- a/apt-pkg/contrib/progress.cc +++ b/apt-pkg/contrib/progress.cc @@ -153,13 +153,15 @@ void OpTextProgress::Done() { if (NoUpdate == false && OldOp.empty() == false) { - char S[300]; + char S[300] = {}; if (_error->PendingError() == true) snprintf(S,sizeof(S),_("%c%s... Error!"),'\r',OldOp.c_str()); - else + else if (not _config->FindB("APT::Internal::OpProgress::EraseLines", true)) snprintf(S,sizeof(S),_("%c%s... Done"),'\r',OldOp.c_str()); Write(S); - cout << endl; + // FIXME: apt-cdrom relies on this end of line being printed + if (_error->PendingError() || not _config->FindB("APT::Internal::OpProgress::EraseLines", true)) + cout << endl; OldOp = string(); } @@ -200,7 +202,8 @@ void OpTextProgress::Update() { snprintf(S,sizeof(S),"\r%s",OldOp.c_str()); Write(S); - cout << endl; + if (_config->FindB("APT::Internal::OpProgress::EraseLines", true)) + cout << endl; } // Print the spinner. Absolute progress shows us a time progress. |