commit: bbfcc313401c27755a2832c100ad20772bad586c Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> AuthorDate: Wed Feb 13 20:39:26 2019 +0000 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> CommitDate: Wed Feb 13 20:39:26 2019 +0000 URL: https://gitweb.gentoo.org/proj/eselect.git/commit/?id=bbfcc313
Warn about deprecated profiles. * modules/profile.eselect (set_symlink): Warn about deprecated profiles, bug 673568. Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> ChangeLog | 5 +++++ modules/profile.eselect | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index 8a3eb59..84673d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2018-12-22 Ulrich Mueller <u...@gentoo.org> + + * modules/profile.eselect (set_symlink): Warn about deprecated + profiles, bug 673568. + 2018-08-07 Ulrich Müller <u...@gentoo.org> * man/profile.eselect.5: Update examples, bug 662996. diff --git a/modules/profile.eselect b/modules/profile.eselect index b88cc2b..68b0826 100644 --- a/modules/profile.eselect +++ b/modules/profile.eselect @@ -116,6 +116,13 @@ set_symlink() { [[ ! -d ${repopath}/profiles/${target} ]] \ && die -q "No profile directory for target \"${target}\"" + if [[ -f ${repopath}/profiles/${target}/deprecated ]]; then + local upgrade=$(sed 1q "${repopath}/profiles/${target}/deprecated") + write_warning_msg "Profile ${target} is deprecated" + [[ -n ${upgrade} ]] \ + && write_warning_msg "Recommending upgrade to ${upgrade}" + fi + # we must call remove_symlink() here instead of calling it from # do_set(), since if the link is removed, we cannot reliably # determine ${arch} in find_targets()