summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2014-08-02 05:44:50 +0200
committerMichael Vogt <mvo@debian.org>2014-08-02 05:44:55 +0200
commita9bb651a04d1eae42164a2fb2cdf92bf4392a532 (patch)
tree6f8c3d3fd32a210dbe02914e4262d77502d36428 /apt-pkg
parent63b7249e6930c1bcb69bac32f10108119eeacc2a (diff)
really move clearsign check into pkgAcqMetaClearSig::Done()
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/acquire-item.cc19
-rw-r--r--apt-pkg/acquire-item.h4
2 files changed, 16 insertions, 7 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index e98eaa445..7690ebb2e 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -2000,21 +2000,28 @@ string pkgAcqMetaClearSig::Custom600Headers() const
return "\nIndex-File: true\nFail-Ignore: true\nLast-Modified: " + TimeRFC1123(Buf.st_mtime);
}
/*}}}*/
-void pkgAcqMetaClearSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf) /*{{{*/
+// pkgAcqMetaClearSig::Done - We got a file /*{{{*/
+// ---------------------------------------------------------------------
+void pkgAcqMetaClearSig::Done(std::string Message,unsigned long long Size,
+ HashStringList const &Hashes,
+ pkgAcquire::MethodConfig *Cnf)
{
- // we failed, we will not get additional items from this method
- ExpectedAdditionalItems = 0;
-
// if we expect a ClearTextSignature (InRelase), ensure that
// this is what we get and if not fail to queue a
// Release/Release.gpg, see #346386
- if (!StartsWithGPGClearTextSignature(DestFile))
+ if (FileExists(DestFile) && !StartsWithGPGClearTextSignature(DestFile))
{
//_error->Error(_("Does not start with a clear sign signature"));
pkgAcquire::Item::Failed(Message, Cnf);
return;
}
-
+ pkgAcqMetaIndex::Done(Message, Size, Hashes, Cnf);
+}
+ /*}}}*/
+void pkgAcqMetaClearSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf) /*{{{*/
+{
+ // we failed, we will not get additional items from this method
+ ExpectedAdditionalItems = 0;
if (AuthPass == false)
{
diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h
index 31279f7df..28577e9b8 100644
--- a/apt-pkg/acquire-item.h
+++ b/apt-pkg/acquire-item.h
@@ -507,8 +507,10 @@ class pkgAcqMetaClearSig : public pkgAcqMetaIndex
std::string MetaSigShortDesc;
public:
- void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf);
+ virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf);
virtual std::string Custom600Headers() const;
+ virtual void Done(std::string Message,unsigned long long Size, HashStringList const &Hashes,
+ pkgAcquire::MethodConfig *Cnf);
/** \brief Create a new pkgAcqMetaClearSig. */
pkgAcqMetaClearSig(pkgAcquire *Owner,