diff options
author | 2019-02-13 21:39:26 +0100 | |
---|---|---|
committer | 2019-02-13 21:39:26 +0100 | |
commit | bbfcc313401c27755a2832c100ad20772bad586c (patch) | |
tree | 03dc2584781ef739b5d9ef7ceb9b7dc4dd043e28 /modules | |
parent | Use simplified copyright notice for GLEP 76 compliance. (diff) | |
download | eselect-bbfcc313401c27755a2832c100ad20772bad586c.tar.gz eselect-bbfcc313401c27755a2832c100ad20772bad586c.tar.bz2 eselect-bbfcc313401c27755a2832c100ad20772bad586c.zip |
Warn about deprecated profiles.
* modules/profile.eselect (set_symlink): Warn about deprecated
profiles, bug 673568.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/profile.eselect | 7 |
1 files changed, 7 insertions, 0 deletions
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() |