Explorar o código

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 %!s(int64=11) %!d(string=hai) anos
pai
achega
7aeab5cb22
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  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,