[devel] [PATCH for apt 31/38] pkgCacheFile: don't regenerate cache if it was already built

Aleksei Nikiforov darktemplar на altlinux.org
Вт Дек 10 18:23:36 MSK 2019


---
 apt/apt-pkg/cachefile.cc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/apt/apt-pkg/cachefile.cc b/apt/apt-pkg/cachefile.cc
index 8b17345..41ca057 100644
--- a/apt/apt-pkg/cachefile.cc
+++ b/apt/apt-pkg/cachefile.cc
@@ -58,6 +58,10 @@ pkgCacheFile::~pkgCacheFile()
 /* */
 bool pkgCacheFile::BuildCaches(OpProgress &Progress,bool WithLock)
 {
+    // Reuse cache if possible
+    if (this->Cache != NULL)
+       return true;
+
    if (WithLock == true)
       if (_system->Lock() == false)
 	 return false;
-- 
2.24.0



Подробная информация о списке рассылки Devel