1 |
commit: bbfcc313401c27755a2832c100ad20772bad586c |
2 |
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Feb 13 20:39:26 2019 +0000 |
4 |
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Feb 13 20:39:26 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/eselect.git/commit/?id=bbfcc313 |
7 |
|
8 |
Warn about deprecated profiles. |
9 |
|
10 |
* modules/profile.eselect (set_symlink): Warn about deprecated |
11 |
profiles, bug 673568. |
12 |
|
13 |
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> |
14 |
|
15 |
ChangeLog | 5 +++++ |
16 |
modules/profile.eselect | 7 +++++++ |
17 |
2 files changed, 12 insertions(+) |
18 |
|
19 |
diff --git a/ChangeLog b/ChangeLog |
20 |
index 8a3eb59..84673d3 100644 |
21 |
--- a/ChangeLog |
22 |
+++ b/ChangeLog |
23 |
@@ -1,3 +1,8 @@ |
24 |
+2018-12-22 Ulrich Mueller <ulm@g.o> |
25 |
+ |
26 |
+ * modules/profile.eselect (set_symlink): Warn about deprecated |
27 |
+ profiles, bug 673568. |
28 |
+ |
29 |
2018-08-07 Ulrich Müller <ulm@g.o> |
30 |
|
31 |
* man/profile.eselect.5: Update examples, bug 662996. |
32 |
|
33 |
diff --git a/modules/profile.eselect b/modules/profile.eselect |
34 |
index b88cc2b..68b0826 100644 |
35 |
--- a/modules/profile.eselect |
36 |
+++ b/modules/profile.eselect |
37 |
@@ -116,6 +116,13 @@ set_symlink() { |
38 |
[[ ! -d ${repopath}/profiles/${target} ]] \ |
39 |
&& die -q "No profile directory for target \"${target}\"" |
40 |
|
41 |
+ if [[ -f ${repopath}/profiles/${target}/deprecated ]]; then |
42 |
+ local upgrade=$(sed 1q "${repopath}/profiles/${target}/deprecated") |
43 |
+ write_warning_msg "Profile ${target} is deprecated" |
44 |
+ [[ -n ${upgrade} ]] \ |
45 |
+ && write_warning_msg "Recommending upgrade to ${upgrade}" |
46 |
+ fi |
47 |
+ |
48 |
# we must call remove_symlink() here instead of calling it from |
49 |
# do_set(), since if the link is removed, we cannot reliably |
50 |
# determine ${arch} in find_targets() |