summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/acquire-item.cc11
-rw-r--r--apt-pkg/deb/debmetaindex.cc1
-rw-r--r--apt-pkg/metaindex.cc3
-rw-r--r--apt-pkg/metaindex.h2
4 files changed, 17 insertions, 0 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index f5ff8288b..ddcff5808 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -1623,6 +1623,7 @@ bool pkgAcqMetaBase::VerifyVendor(string const &) /*{{{*/
{ "Codename", AllowInfoChange, &metaIndex::GetCodename },
{ nullptr, false, nullptr }
};
+ _error->PushToStack();
auto const CheckReleaseInfo = [&](char const * const Type, bool const AllowChange, decltype(checkers[0].Getter) const Getter) {
std::string const Last = (TransactionManager->LastMetaIndexParser->*Getter)();
std::string const Now = (TransactionManager->MetaIndexParser->*Getter)();
@@ -1655,6 +1656,16 @@ bool pkgAcqMetaBase::VerifyVendor(string const &) /*{{{*/
CRI &= Allow;
}
}
+ if (_error->empty(GlobalError::NOTICE) == false)
+ {
+ auto const notes = TransactionManager->MetaIndexParser->GetReleaseNotes();
+ if (notes.empty() == false)
+ {
+ // TRANSLATOR: the "this" refers to changes in the repository like a new release or owner change
+ _error->Notice(_("More information about this can be found online in the Release notes at: %s"), notes.c_str());
+ }
+ }
+ _error->MergeWithStack();
if (CRI == false)
{
// TRANSLATOR: %s is the name of the manpage in question, e.g. apt-secure(8)
diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc
index 424ef08f6..df7419ddd 100644
--- a/apt-pkg/deb/debmetaindex.cc
+++ b/apt-pkg/deb/debmetaindex.cc
@@ -398,6 +398,7 @@ bool debReleaseIndex::Load(std::string const &Filename, std::string * const Erro
SetVersion(Section.FindS("Version"));
Suite = Section.FindS("Suite");
Codename = Section.FindS("Codename");
+ SetReleaseNotes(Section.FindS("Release-Notes"));
{
std::string const archs = Section.FindS("Architectures");
if (archs.empty() == false)
diff --git a/apt-pkg/metaindex.cc b/apt-pkg/metaindex.cc
index 8765851d6..695cf8804 100644
--- a/apt-pkg/metaindex.cc
+++ b/apt-pkg/metaindex.cc
@@ -16,6 +16,7 @@ class metaIndexPrivate /*{{{*/
std::string Label;
std::string Version;
signed short DefaultPin;
+ std::string ReleaseNotes;
};
/*}}}*/
@@ -67,6 +68,7 @@ APT_PURE std::string metaIndex::GetLabel() const { return d->Label; }
APT_PURE std::string metaIndex::GetVersion() const { return d->Version; }
APT_PURE std::string metaIndex::GetCodename() const { return Codename; }
APT_PURE std::string metaIndex::GetSuite() const { return Suite; }
+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; }
@@ -164,3 +166,4 @@ void metaIndex::SetOrigin(std::string const &origin) { d->Origin = origin; }
void metaIndex::SetLabel(std::string const &label) { d->Label = label; }
void metaIndex::SetVersion(std::string const &version) { d->Version = version; }
void metaIndex::SetDefaultPin(signed short const defaultpin) { d->DefaultPin = defaultpin; }
+void metaIndex::SetReleaseNotes(std::string const &notes) { d->ReleaseNotes = notes; }
diff --git a/apt-pkg/metaindex.h b/apt-pkg/metaindex.h
index eeeb9d807..1951f118f 100644
--- a/apt-pkg/metaindex.h
+++ b/apt-pkg/metaindex.h
@@ -77,6 +77,7 @@ public:
std::string GetVersion() const;
std::string GetCodename() const;
std::string GetSuite() const;
+ std::string GetReleaseNotes() const;
signed short GetDefaultPin() const;
bool GetSupportsAcquireByHash() const;
time_t GetValidUntil() const;
@@ -123,6 +124,7 @@ public:
APT_HIDDEN void SetLabel(std::string const &label);
APT_HIDDEN void SetVersion(std::string const &version);
APT_HIDDEN void SetDefaultPin(signed short const defaultpin);
+ APT_HIDDEN void SetReleaseNotes(std::string const &notes);
};
#endif