]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/cachefile.cc
debian/control: Set Standards-Version to 3.9.7
[apt.git] / apt-pkg / cachefile.cc
index 3e3540bbd61aaa16623e8ca474a022aeae189864..909da5cb4d6fe25a69aa6707e0317cd8a8e65666 100644 (file)
@@ -221,7 +221,7 @@ bool pkgCacheFile::AddIndexFile(pkgIndexFile * const File)          /*{{{*/
       {
         {
            pkgCacheGenerator Gen(dynmmap, nullptr);
-           if (File->Merge(Gen, nullptr) == false)
+           if (Gen.Start() == false || File->Merge(Gen, nullptr) == false)
               return false;
         }
         Cache = new pkgCache(Map);
@@ -238,6 +238,7 @@ bool pkgCacheFile::AddIndexFile(pkgIndexFile * const File)          /*{{{*/
       ExternOwner = false;
       Map = NULL;
    }
+   _system->UnLock(true);
    return true;
 }
                                                                        /*}}}*/