]> git.saurik.com Git - apt.git/blobdiff - apt-private/private-download.cc
show or-groups in not-installed recommends and suggests lists
[apt.git] / apt-private / private-download.cc
index 37fae18e91633c9d22bd3bbff375744b9186566e..09914618760ef9311742efa0de46b18666f5aadb 100644 (file)
@@ -78,20 +78,23 @@ bool CheckDropPrivsMustBeDisabled(pkgAcquire &Fetcher)                      /*{{{*/
 // CheckAuth - check if each download comes form a trusted source      /*{{{*/
 bool CheckAuth(pkgAcquire& Fetcher, bool const PromptUser)
 {
-   std::string UntrustedList;
+   std::vector<std::string> UntrustedList;
    for (pkgAcquire::ItemIterator I = Fetcher.ItemsBegin(); I < Fetcher.ItemsEnd(); ++I)
       if (!(*I)->IsTrusted())
-          UntrustedList += std::string((*I)->ShortDesc()) + " ";
+        UntrustedList.push_back((*I)->ShortDesc());
 
-   if (UntrustedList == "")
+   if (UntrustedList.empty())
       return true;
 
    return AuthPrompt(UntrustedList, PromptUser);
 }
 
-bool AuthPrompt(std::string const &UntrustedList, bool const PromptUser)
+bool AuthPrompt(std::vector<std::string> const &UntrustedList, bool const PromptUser)
 {
-   ShowList(c2out,_("WARNING: The following packages cannot be authenticated!"),UntrustedList,"");
+   ShowList(c2out,_("WARNING: The following packages cannot be authenticated!"), UntrustedList,
+        [](std::string const&) { return true; },
+        [](std::string const&str) { return str; },
+        [](std::string const&) { return ""; });
 
    if (_config->FindB("APT::Get::AllowUnauthenticated",false) == true)
    {