summaryrefslogtreecommitdiff
path: root/apt-pkg/deb
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2020-03-06 12:57:38 +0000
committerJulian Andres Klode <jak@debian.org>2020-03-06 12:57:38 +0000
commit44d8409b9c8399577d7652649862be2591b1ff64 (patch)
treecf511b030725b1a7bb97f3c402ff5df773b84382 /apt-pkg/deb
parent9f36e3cf3fe158fd52c662b5c8c6f6cab327fa06 (diff)
parent1b81f6bd13bb31e59da3f53cfdc7caab43abf887 (diff)
Merge branch 'pu/improve-locking-msgs' into 'master'
Pu/improve locking msgs See merge request apt-team/apt!111
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r--apt-pkg/deb/debsystem.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/apt-pkg/deb/debsystem.cc b/apt-pkg/deb/debsystem.cc
index da7ae2e42..6904879b6 100644
--- a/apt-pkg/deb/debsystem.cc
+++ b/apt-pkg/deb/debsystem.cc
@@ -79,6 +79,11 @@ debSystem::~debSystem()
checking of the updates directory. */
static int GetLockMaybeWait(std::string const &file, OpProgress *Progress, int &timeoutSec)
{
+ struct ScopedAbsoluteProgress
+ {
+ ScopedAbsoluteProgress() { _config->Set("APT::Internal::OpProgress::Absolute", true); }
+ ~ScopedAbsoluteProgress() { _config->Set("APT::Internal::OpProgress::Absolute", false); }
+ } _scopedAbsoluteProgress;
int fd = -1;
if (timeoutSec == 0 || Progress == nullptr)
return GetLock(file);
@@ -102,7 +107,7 @@ static int GetLockMaybeWait(std::string const &file, OpProgress *Progress, int &
_error->PopMessage(poppedError);
_error->RevertToStack();
- strprintf(completeError, _("Waiting for cache lock (%s)"), poppedError.c_str());
+ strprintf(completeError, _("Waiting for cache lock: %s"), poppedError.c_str());
sleep(1);
Progress->OverallProgress(i, timeoutSec, 0, completeError);
}