From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D4E1D138351 for ; Sun, 19 Apr 2020 01:21:56 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 18078E08A6; Sun, 19 Apr 2020 01:21:56 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 00291E08A6 for ; Sun, 19 Apr 2020 01:21:55 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E411434F071 for ; Sun, 19 Apr 2020 01:21:54 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9A3A471 for ; Sun, 19 Apr 2020 01:21:52 +0000 (UTC) From: "Thomas Deutschmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Deutschmann" Message-ID: <1587258746.e6337fe78b77a17b23d7e7db46af7bec32f1c126.whissi@gentoo> Subject: [gentoo-commits] proj/eselect-rust:master commit in: / X-VCS-Repository: proj/eselect-rust X-VCS-Files: rust.eselect.in X-VCS-Directories: / X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: e6337fe78b77a17b23d7e7db46af7bec32f1c126 X-VCS-Branch: master Date: Sun, 19 Apr 2020 01:21:52 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: be92874d-032b-430b-ac4c-4df447eac29a X-Archives-Hash: a89db7c66f47b9af0504fbfde28575b7 commit: e6337fe78b77a17b23d7e7db46af7bec32f1c126 Author: Thomas Deutschmann gentoo org> AuthorDate: Sun Apr 19 01:06:45 2020 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Sun Apr 19 01:12:26 2020 +0000 URL: https://gitweb.gentoo.org/proj/eselect-rust.git/commit/?id=e6337fe7 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 gentoo.org> rust.eselect.in | 10 ++++++++++ 1 file changed, 10 insertions(+) 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}"