Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 688864 - app-eselect/eselect-rust does not create tool symlinks under some conditions
Summary: app-eselect/eselect-rust does not create tool symlinks under some conditions
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Rust Project
URL:
Whiteboard:
Keywords:
: 691360 700400 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-06-28 03:54 UTC by Georgy Yakovlev
Modified: 2020-04-19 01:29 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Georgy Yakovlev archtester gentoo-dev 2019-06-28 03:54:35 UTC
If I install
dev-lang/rust-bin[-clippy,-rustfmt]

and re-install with clippy and rustfmt enabled, eselect rust will not update symlinks for those tools.


steps to reproduce, need a system with no dev-lang/rust installed, otherwise it get selected.


USE="-clippy -rustfmt" emerge rust-bin -v1

eselect rust set rust-bin-1.35.0

USE="clippy rustfmt" emerge rust-bin -v1


ls -la /usr/bin/cargo-clippy*
lrwxrwxrwx 1 root root 53 Jun 27 20:52 /usr/bin/cargo-clippy-bin-1.35.0 -> ../../opt/rust-bin-1.35.0/bin/cargo-clippy-bin-1.35.0


after running another eselect

eselect rust set rust-bin-1.35.0
ls -la /usr/bin/cargo-clippy*
lrwxrwxrwx 1 root root 32 Jun 27 20:52 /usr/bin/cargo-clippy -> /usr/bin/cargo-clippy-bin-1.35.0
lrwxrwxrwx 1 root root 53 Jun 27 20:52 /usr/bin/cargo-clippy-bin-1.35.0 -> ../../opt/rust-bin-1.35.0/bin/cargo-clippy-bin-1.35.0


so eselect-rust need to refresh currently selected provider symlinks even if it's the same version.
Comment 1 Georgy Yakovlev archtester gentoo-dev 2019-08-05 00:27:27 UTC
*** Bug 691360 has been marked as a duplicate of this bug. ***
Comment 2 Georgy Yakovlev archtester gentoo-dev 2020-01-01 23:10:44 UTC
adding for reference

<Whissi> gyakovlev: Guess we just need to drop "--if-unset" from pkg_postinst
<gyakovlev> Whissi: true, if we drop --if-unset it probably will work, but it means find_missing_broken_symlinks() in do_update() is not doing what it should. it checks stale provider file /etc/env.d/rust/last-set which is a copy of previous run.
<Whissi> gyakovlev: Well, I think it's doing exactly what it should do. You want something else. Note: last file is managed by eselect, not package. I.e. eselect-rust can't know at this stage that active rust provider gained new symlink targets...
<gyakovlev> well, if this file was a symlink it'll auto-update and will trigger the check properly, but making it a symlink will probably require other changes, I haven't really started yet, just reading code.
<gyakovlev> Whissi: yeah, found logic error, it will trigger if you remove useflag (as one of tool symlinks will become invalid)
<Whissi> The original idea was to record what was set and just check if something we set in the past got broken and restore just that. Looks like we need to expand this check and compare for new (or removed) targets from provider file.
<gyakovlev> but it will not trigger if you ADD a new tool
<gyakovlev> yep you are correct. same conclusion. it already check removed, just need to check added somehow.
Comment 3 Thomas Deutschmann (RETIRED) gentoo-dev 2020-04-19 01:12:19 UTC
*** Bug 700400 has been marked as a duplicate of this bug. ***
Comment 4 Larry the Git Cow gentoo-dev 2020-04-19 01:21:52 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/eselect-rust.git/commit/?id=e6337fe78b77a17b23d7e7db46af7bec32f1c126

commit e6337fe78b77a17b23d7e7db46af7bec32f1c126
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2020-04-19 01:06:45 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2020-04-19 01:12:26 +0000

    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>

 rust.eselect.in | 10 ++++++++++
 1 file changed, 10 insertions(+)
Comment 5 Larry the Git Cow gentoo-dev 2020-04-19 01:29:19 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c29266c46559b09a2cdd2196f576fd81f1bea046

commit c29266c46559b09a2cdd2196f576fd81f1bea046
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2020-04-19 01:28:01 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2020-04-19 01:29:08 +0000

    app-eselect/eselect-rust: bump to v20200419
    
    Closes: https://bugs.gentoo.org/688864
    Package-Manager: Portage-2.3.99, Repoman-2.3.22
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 app-eselect/eselect-rust/Manifest                  |  1 +
 .../eselect-rust/eselect-rust-20200419.ebuild      | 32 ++++++++++++++++++++++
 2 files changed, 33 insertions(+)