diff options
author | 2020-04-19 03:06:45 +0200 | |
---|---|---|
committer | 2020-04-19 03:12:26 +0200 | |
commit | e6337fe78b77a17b23d7e7db46af7bec32f1c126 (patch) | |
tree | 641f62d08fe1e5eb329f0a868f077e6f3f675546 | |
parent | bump version to 20200101 (diff) | |
download | eselect-rust-e6337fe78b77a17b23d7e7db46af7bec32f1c126.tar.gz eselect-rust-e6337fe78b77a17b23d7e7db46af7bec32f1c126.tar.bz2 eselect-rust-e6337fe78b77a17b23d7e7db46af7bec32f1c126.zip |
find_missing_broken_symlinks(): add symlinks for new targets
This commit will ensure that we will create a new symlink
which didn't exist before for a new target, i.e. after
re-installing a rust provider with changed USE flags.
Bug: https://bugs.gentoo.org/688864
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
-rw-r--r-- | rust.eselect.in | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/rust.eselect.in b/rust.eselect.in index 9de7149..1b33280 100644 --- a/rust.eselect.in +++ b/rust.eselect.in @@ -18,6 +18,16 @@ find_missing_broken_symlinks() { local -a missing_symlinks local required_symlinks=( "/usr/bin/rustc" $(get_last_set_symlinks) ) + local target=$(get_current_target) + if [ "${target}" != "NOT_SET" ]; then + # make sure we add new symlinks for new targets, + # i.e. after changed USE flags + required_symlinks+=( $(get_symlinks ${target}) ) + fi + + required_symlinks=( $(printf "%s\n" "${required_symlinks[@]}" | sort -u) ) + + local i for i in "${required_symlinks[@]}"; do local symlink="${EROOT%/}${i}" |