summaryrefslogtreecommitdiff
path: root/apt-private/private-update.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2017-01-19 01:09:05 +0100
committerJulian Andres Klode <jak@debian.org>2017-02-22 16:53:46 +0100
commitb234a610a3818af69952bf85c389588a99b4349f (patch)
tree54e76fc2c87b3059bbd48beaf1bc4d7d065a5ade /apt-private/private-update.cc
parente3f9554224c59e1201d00716ef7d7ec046f79f5d (diff)
don't lock dpkg in update commands
The update command acquires a lock on lists/, but at the end it will also require the dpkg/lock while building the binary caches. That seems rather pointless as we are only reading those files, not causing writing in them. This can also cause problems if a package installation is running and a background process (like cron) starts an update: If you are "lucky" enough the update process will pick the dpkg lock in between apt calls causing the installation process to fail. (cherry picked from commit 0d9081598afa051409b03dbdbe5025cd7ce59ba4)
Diffstat (limited to 'apt-private/private-update.cc')
-rw-r--r--apt-private/private-update.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/apt-private/private-update.cc b/apt-private/private-update.cc
index b63b7d963..a886c830f 100644
--- a/apt-private/private-update.cc
+++ b/apt-private/private-update.cc
@@ -76,14 +76,14 @@ bool DoUpdate(CommandLine &CmdL)
// Rebuild the cache.
pkgCacheFile::RemoveCaches();
- if (Cache.BuildCaches() == false)
+ if (Cache.BuildCaches(false) == false)
return false;
// show basic stats (if the user whishes)
if (_config->FindB("APT::Cmd::Show-Update-Stats", false) == true)
{
int upgradable = 0;
- if (Cache.Open() == false)
+ if (Cache.Open(false) == false)
return false;
for (pkgCache::PkgIterator I = Cache->PkgBegin(); I.end() != true; ++I)
{