summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire-item.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2017-05-28 13:24:33 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2017-06-28 19:18:47 +0200
commit96ebab48c25fcd1ee83729cdba4be8a6343a8766 (patch)
treef7fdd7f2a561beb89dbfe70ca194b289b40362e5 /apt-pkg/acquire-item.cc
parent081fbea14d12f79c8d91ce4fe1f1004c7bc08656 (diff)
show a Release-Notes URI if infos were changed
This gives the repository owner a chance to explain why this change was needed – e.g. explaining the organisational changes or simply detailing the changes in the new release made. Note that this URI is also shown if the change is accepted, so it also draws attention to release notes of minor updates (if users watch apt output closely).
Diffstat (limited to 'apt-pkg/acquire-item.cc')
-rw-r--r--apt-pkg/acquire-item.cc11
1 files changed, 11 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)