// 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))
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
}
else
{
- if(StopAuthentication(RealURI, Message))
+ if(CheckStopAuthentication(RealURI, Message))
return;
_error->Warning(_("The data from '%s' is not signed. Packages "
*/
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.
*
*/
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,