1 |
commit: 66c4c263a0f983bfb456e43cc674a25323ea189c |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Mar 11 01:13:53 2019 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Mar 11 04:56:21 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/eselect-rust.git/commit/?id=66c4c263 |
7 |
|
8 |
Mark "unset" action as deprecated |
9 |
|
10 |
As long as one Rust implementation is installed, there should be always |
11 |
a Rust implementation marked as default. |
12 |
|
13 |
However, we need to keep this function until all ebuilds which are calling |
14 |
"eselect rust unset" are gone. So make this action an alias of new |
15 |
cleanup action. |
16 |
|
17 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
18 |
|
19 |
rust.eselect.in | 30 ++---------------------------- |
20 |
1 file changed, 2 insertions(+), 28 deletions(-) |
21 |
|
22 |
diff --git a/rust.eselect.in b/rust.eselect.in |
23 |
index 1360dc2..0ecf87a 100644 |
24 |
--- a/rust.eselect.in |
25 |
+++ b/rust.eselect.in |
26 |
@@ -284,37 +284,11 @@ do_update() { |
27 |
### unset action ### |
28 |
|
29 |
describe_unset() { |
30 |
- echo "Unset active Rust version" |
31 |
-} |
32 |
- |
33 |
-describe_unset_options() { |
34 |
- echo "--if-invalid : Unset only if symlink is invalid (e.g. package was uninstalled)" |
35 |
+ echo 'DEPRECATED: Use "cleanup" action instead!' |
36 |
} |
37 |
|
38 |
do_unset() { |
39 |
- local if_invalid="0" |
40 |
- while [[ $# > 0 ]]; do |
41 |
- case "$1" in |
42 |
- --if-invalid) |
43 |
- if_invalid="1" |
44 |
- ;; |
45 |
- *) |
46 |
- die -q "Unrecognized argument '$1'" |
47 |
- ;; |
48 |
- esac |
49 |
- shift |
50 |
- done |
51 |
- |
52 |
- if [[ "${if_invalid}" == "1" ]]; then |
53 |
- local missing_symlinks=( $(find_missing_broken_symlinks) ) |
54 |
- if [[ ${#missing_symlinks[@]} -eq 0 ]]; then |
55 |
- return |
56 |
- else |
57 |
- echo "Not all symlinks set. Will unset current symlinked Rust binaries!" |
58 |
- fi |
59 |
- fi |
60 |
- |
61 |
- unset_version || die -q "Couldn't unset active version" |
62 |
+ do_cleanup |
63 |
} |
64 |
|
65 |
# vim: set ft=eselect : |