]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/acquire-item.cc
fileutl: simple_buffer: Add write() and full() methods
[apt.git] / apt-pkg / acquire-item.cc
index 54a50ff3459afad1959bc1a822ee3c7bde765865..7f31d14492b967a649c0cb5bdd2e1f3dadd18dd3 100644 (file)
@@ -1075,6 +1075,16 @@ void pkgAcqMetaBase::QueueIndexes(bool const verify)                     /*{{{*/
            strprintf(ErrorText, _("Unable to find expected entry '%s' in Release file (Wrong sources.list entry or malformed file)"), Target->MetaKey.c_str());
            return;
         }
+        else
+        {
+           auto const hashes = GetExpectedHashesFor(Target->MetaKey);
+           if (hashes.usable() == false && hashes.empty() == false)
+           {
+              _error->Warning(_("Skipping acquire of configured file '%s' as repository '%s' provides only weak security information for it"),
+                       Target->MetaKey.c_str(), TransactionManager->Target.Description.c_str());
+              continue;
+           }
+        }
 
         // autoselect the compression method
         std::vector<std::string> types = VectorizeString(Target->Option(IndexTarget::COMPRESSIONTYPES), ' ');