summaryrefslogtreecommitdiff
path: root/apt-pkg/metaindex.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2018-02-19 15:06:06 +0000
committerJulian Andres Klode <jak@debian.org>2018-02-19 15:06:06 +0000
commit928ecff984be22632c27a69e072741e74491292c (patch)
treef0d760cc2da3841b90e7f067fd39dbc355c971c8 /apt-pkg/metaindex.cc
parent13c85c9cec9e071e90ea190a74cbaabe7c51024c (diff)
parent9e5899cac1a6367e3769af52a724821880e538f6 (diff)
Merge branch 'pu/not-valid-before' into 'master'
Check that Date of Release file is not in the future See merge request apt-team/apt!3
Diffstat (limited to 'apt-pkg/metaindex.cc')
-rw-r--r--apt-pkg/metaindex.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/apt-pkg/metaindex.cc b/apt-pkg/metaindex.cc
index bdae6dcc9..8cbdb5e01 100644
--- a/apt-pkg/metaindex.cc
+++ b/apt-pkg/metaindex.cc
@@ -72,6 +72,13 @@ APT_PURE std::string metaIndex::GetReleaseNotes() const { return d->ReleaseNotes
APT_PURE signed short metaIndex::GetDefaultPin() const { return d->DefaultPin; }
APT_PURE bool metaIndex::GetSupportsAcquireByHash() const { return SupportsAcquireByHash; }
APT_PURE time_t metaIndex::GetValidUntil() const { return ValidUntil; }
+APT_PURE time_t metaIndex::GetNotBefore() const
+{
+ debReleaseIndex const *const deb = dynamic_cast<debReleaseIndex const *>(this);
+ if (deb != nullptr)
+ return deb->GetNotBefore();
+ return 0;
+}
APT_PURE time_t metaIndex::GetDate() const { return this->Date; }
APT_PURE metaIndex::TriState metaIndex::GetLoadedSuccessfully() const { return LoadedSuccessfully; }
APT_PURE std::string metaIndex::GetExpectedDist() const { return Dist; }