]> git.saurik.com Git - apt.git/commitdiff
It is just so absolutely critical that this works. cydia_1.1.28%b4
authorJay Freeman (saurik) <saurik@saurik.com>
Fri, 30 Dec 2016 22:08:16 +0000 (14:08 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Fri, 30 Dec 2016 22:08:16 +0000 (14:08 -0800)
apt-pkg/indexfile.cc
apt-pkg/pkgcachegen.cc

index 934943205ae6722af43d011fda57bc9bfd4ad68b..74d46d699fc6d353597353e59668c05a146d9d4a 100644 (file)
@@ -377,7 +377,7 @@ bool pkgDebianIndexFile::Merge(pkgCacheGenerator &Gen,OpProgress * const Prog)
    File->mtime = Pkg.ModificationTime();
 
    if (Gen.MergeList(*Parser) == false)
-      return _error->Error("Problem with MergeList %s",PackageFile.c_str());
+      return _error->Warning("Problem with MergeList %s",PackageFile.c_str());
    return true;
 }
 pkgCache::PkgFileIterator pkgDebianIndexFile::FindInCache(pkgCache &Cache) const
index 1bdd43bf8610d29ad772f391bdb5a731f8cd2d09..51bb9ec7b3545fb97b479549169e02f2c7c666df 100644 (file)
@@ -1550,16 +1550,14 @@ static map_filesize_t ComputeSize(pkgSourceList const * const List, FileIterator
 }
                                                                        /*}}}*/
 // BuildCache - Merge the list of index files into the cache           /*{{{*/
-static bool BuildCache(pkgCacheGenerator &Gen,
+static void BuildCache(pkgCacheGenerator &Gen,
                       OpProgress * const Progress,
                       map_filesize_t &CurrentSize,map_filesize_t TotalSize,
                       pkgSourceList const * const List,
                       FileIterator const Start, FileIterator const End)
 {
-   bool mergeFailure = false;
-
    auto const indexFileMerge = [&](pkgIndexFile * const I) {
-      if (I->HasPackages() == false || mergeFailure)
+      if (I->HasPackages() == false)
         return;
 
       if (I->Exists() == false)
@@ -1578,7 +1576,7 @@ static bool BuildCache(pkgCacheGenerator &Gen,
       CurrentSize += Size;
 
       if (I->Merge(Gen,Progress) == false)
-        mergeFailure = true;
+        return;
    };
 
    if (List !=  NULL)
@@ -1598,8 +1596,6 @@ static bool BuildCache(pkgCacheGenerator &Gen,
         std::vector <pkgIndexFile *> *Indexes = (*i)->GetIndexFiles();
         if (Indexes != NULL)
            std::for_each(Indexes->begin(), Indexes->end(), indexFileMerge);
-        if (mergeFailure)
-           return false;
       }
    }
 
@@ -1607,10 +1603,7 @@ static bool BuildCache(pkgCacheGenerator &Gen,
    {
       Gen.SelectReleaseFile("", "");
       std::for_each(Start, End, indexFileMerge);
-      if (mergeFailure)
-        return false;
    }
-   return true;
 }
                                                                        /*}}}*/
 // CacheGenerator::MakeStatusCache - Construct the status cache                /*{{{*/
@@ -1784,9 +1777,8 @@ bool pkgCacheGenerator::MakeStatusCache(pkgSourceList &List,OpProgress *Progress
         return false;
 
       TotalSize += ComputeSize(&List, Files.begin(),Files.end());
-      if (BuildCache(*Gen, Progress, CurrentSize, TotalSize, &List,
-              Files.end(),Files.end()) == false)
-        return false;
+      BuildCache(*Gen, Progress, CurrentSize, TotalSize, &List,
+              Files.end(),Files.end());
 
       if (Writeable == true && SrcCacheFile.empty() == false)
         if (writeBackMMapToFile(Gen.get(), Map.get(), SrcCacheFile) == false)
@@ -1797,9 +1789,8 @@ bool pkgCacheGenerator::MakeStatusCache(pkgSourceList &List,OpProgress *Progress
    {
       if (Debug == true)
         std::clog << "Building status cache in pkgcache.bin now" << std::endl;
-      if (BuildCache(*Gen, Progress, CurrentSize, TotalSize, NULL,
-              Files.begin(), Files.end()) == false)
-        return false;
+      BuildCache(*Gen, Progress, CurrentSize, TotalSize, NULL,
+              Files.begin(), Files.end());
 
       if (Writeable == true && CacheFile.empty() == false)
         if (writeBackMMapToFile(Gen.get(), Map.get(), CacheFile) == false)
@@ -1820,9 +1811,8 @@ bool pkgCacheGenerator::MakeStatusCache(pkgSourceList &List,OpProgress *Progress
       }
 
       Files = List.GetVolatileFiles();
-      if (BuildCache(*Gen, Progress, CurrentSize, TotalSize, NULL,
-              Files.begin(), Files.end()) == false)
-        return false;
+      BuildCache(*Gen, Progress, CurrentSize, TotalSize, NULL,
+              Files.begin(), Files.end());
    }
 
    if (OutMap != nullptr)
@@ -1861,9 +1851,8 @@ bool pkgCacheGenerator::MakeOnlyStatusCache(OpProgress *Progress,DynamicMMap **O
    pkgCacheGenerator Gen(Map.get(),Progress);
    if (Gen.Start() == false || _error->PendingError() == true)
       return false;
-   if (BuildCache(Gen,Progress,CurrentSize,TotalSize, NULL,
-                 Files.begin(), Files.end()) == false)
-      return false;
+   BuildCache(Gen,Progress,CurrentSize,TotalSize, NULL,
+                 Files.begin(), Files.end());
 
    if (_error->PendingError() == true)
       return false;