summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire-item.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2014-10-06 14:54:53 +0200
committerMichael Vogt <mvo@ubuntu.com>2014-10-06 14:54:53 +0200
commit2d0a7bb434ebef179ab4955dfb09262452213190 (patch)
tree4f4d5fd50a7958e7d49d51df1ccf59b738bf2e10 /apt-pkg/acquire-item.cc
parent42299a28ac40721f6cf29c9b786924c2cd4a210f (diff)
rename StopAuthentication -> CheckStopAuthentication and make it protected
Diffstat (limited to 'apt-pkg/acquire-item.cc')
-rw-r--r--apt-pkg/acquire-item.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index c90210af7..e23acbd2a 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -1502,9 +1502,12 @@ void pkgAcqMetaBase::TransactionStageRemoval(Item *I,
// AcqMetaBase::GenerateAuthWarning - Check gpg authentication error /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool pkgAcqMetaBase::StopAuthentication(const std::string &RealURI,
- const std::string &Message)
+bool pkgAcqMetaBase::CheckStopAuthentication(const std::string &RealURI,
+ const std::string &Message)
{
+ // FIXME: this entire function can do now that we disallow going to
+ // a unauthenticated state and can cleanly rollback
+
string Final = _config->FindDir("Dir::State::lists") + URItoFileName(RealURI);
if(FileExists(Final))
@@ -1626,7 +1629,7 @@ void pkgAcqMetaSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf)/*{{{*/
string Final = _config->FindDir("Dir::State::lists") + URItoFileName(RealURI);
// check if we need to fail at this point
- if (AuthPass == true && StopAuthentication(RealURI, Message))
+ if (AuthPass == true && CheckStopAuthentication(RealURI, Message))
return;
// FIXME: meh, this is not really elegant
@@ -2154,7 +2157,7 @@ void pkgAcqMetaClearSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf) /*
}
else
{
- if(StopAuthentication(RealURI, Message))
+ if(CheckStopAuthentication(RealURI, Message))
return;
_error->Warning(_("The data from '%s' is not signed. Packages "