From 96ebab48c25fcd1ee83729cdba4be8a6343a8766 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 28 May 2017 13:24:33 +0200 Subject: show a Release-Notes URI if infos were changed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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). --- apt-pkg/acquire-item.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'apt-pkg/acquire-item.cc') 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) -- cgit v1.2.3