Просмотр исходного кода

display a warning for unsigned repos

The same message is used for InRelease if fails in gpgv, but the
Release/Release.gpg duo needs to handle the failing download case as
well (InRelease just defers to the duo if download fails) and print a
message accompaning the insecure error to provide a hint on what is
going on.
David Kalnischkies лет назад: 11
Родитель
Сommit
7aeab5cb22
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      apt-pkg/acquire-item.cc

+ 4 - 0
apt-pkg/acquire-item.cc

@@ -1738,6 +1738,10 @@ void pkgAcqMetaSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf)/*{{{*/
    // check if we need to fail at this point 
    if (AuthPass == true && CheckStopAuthentication(RealURI, Message))
          return;
+   else if (AuthPass == false)
+      _error->Warning(_("The data from '%s' is not signed. Packages "
+                        "from that repository can not be authenticated."),
+                      URIDesc.c_str());
 
    // FIXME: meh, this is not really elegant
    string InReleaseURI = RealURI.replace(RealURI.rfind("Release.gpg"), 12,