aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2019-02-13 21:39:26 +0100
committerUlrich Müller <ulm@gentoo.org>2019-02-13 21:39:26 +0100
commitbbfcc313401c27755a2832c100ad20772bad586c (patch)
tree03dc2584781ef739b5d9ef7ceb9b7dc4dd043e28 /modules
parentUse simplified copyright notice for GLEP 76 compliance. (diff)
downloadeselect-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.eselect7
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()