]> git.saurik.com Git - apt.git/commitdiff
rename StopAuthentication -> CheckStopAuthentication and make it protected
authorMichael Vogt <mvo@ubuntu.com>
Mon, 6 Oct 2014 12:54:53 +0000 (14:54 +0200)
committerMichael Vogt <mvo@ubuntu.com>
Mon, 6 Oct 2014 12:54:53 +0000 (14:54 +0200)
apt-pkg/acquire-item.cc
apt-pkg/acquire-item.h

index c90210af7df5f54487e73b9ab61c65441c9d55b2..e23acbd2a0fca898d06e070608d3cb764a2688c3 100644 (file)
@@ -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 "
index 393f3a250969e802ce8d5880a975efdddbc01f6b..02b8c13e8ec465fd683ab790d4fbfad91e77001e 100644 (file)
@@ -413,6 +413,10 @@ class pkgAcqMetaBase  : public pkgAcquire::Item
     */
    bool CheckAuthDone(std::string Message, const std::string &RealURI);
 
+   /** Check if the current item should fail at this point */
+   bool CheckStopAuthentication(const std::string &RealURI,
+                                const std::string &Message);
+
    /** \brief Check that the release file is a release file for the
     *  correct distribution.
     *
@@ -436,11 +440,6 @@ class pkgAcqMetaBase  : public pkgAcquire::Item
     */
    void TransactionStageRemoval(Item *I, const std::string &FinalFile);
 
-   /** Check if the current item should fail at this point */
-   bool StopAuthentication(const std::string &RealURI,
-                           const std::string &Message);
-
-
    pkgAcqMetaBase(pkgAcquire *Owner,
                   const std::vector<IndexTarget*>* IndexTargets,
                   indexRecords* MetaIndexParser,