Now that dev-util/cargo is integrated into >=dev-lang/rust{,-bin}-1.30.1 again every user upgrading will see that dev-util/cargo will be unmerged as part of the upgrade process (see bug 671150) but > eselect rust update --if-unset which will be called in pkg_postinst won't create "/usr/bin/cargo" symlink with the result that any package requiring cargo will complain about missing cargo. Once you manually run > eselect rust list > eselect rust set <number> and select >=rust-1.30.1, the symlink will be created but this isn't a good upgrade experience. If we cannot do that better please display at least an ewarn to tell people to manually check symlinks/call eselect.
I agree that the current situation sucks, but I find the eselect code pretty messy and so I don't really want to make involved changes to it. Not sure if any other Rust team members have ideas how to fix this cleanly? As for an ewarn message, how about something like this? "cargo is now installed from dev-lang/rust{,-bin} instead of dev-util/cargo. This might have resulted in a dangling symlink for /usr/bin/cargo on some systems. This can be resolved by calling `sudo eselect rust set ${P}`."
*** Bug 671212 has been marked as a duplicate of this bug. ***
*** Bug 671220 has been marked as a duplicate of this bug. ***
It would be easier if 'eselect rust' provided 'show' action... Anyway: pkg_postinst() { eselect rust update --if-unset # Re-set active version to restore cargo symlink. rust_active_version=$(readlink "${EROOT}/usr/bin/rustc") rust_active_version=${rust_active_version##*/} rust_active_version=${rust_active_version/rustc-/rust-} eselect rust set "${rust_active_version}"
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #4) > pkg_postinst() { > eselect rust update --if-unset > # Re-set active version to restore cargo symlink. > rust_active_version=$(readlink "${EROOT}/usr/bin/rustc") > rust_active_version=${rust_active_version##*/} > rust_active_version=${rust_active_version/rustc-/rust-} > eselect rust set "${rust_active_version}" And with 'local': pkg_postinst() { eselect rust update --if-unset # Re-set active version to restore cargo symlink. local rust_active_version=$(readlink "${EROOT}/usr/bin/rustc") rust_active_version=${rust_active_version##*/} rust_active_version=${rust_active_version/rustc-/rust-} eselect rust set "${rust_active_version}"
From my understand we cannot solve the problem within pkg_* from dev-lang/rust{,-bin} because /usr/bin/cargo is never owned by dev-lang/rust{,-bin} but sometimes owned by dev-util/cargo which will be removed *after* merging dev-lang/rust{,-bin} and calling "eselect rust...". I think dev-util/cargo would also need to call "eselect rust" with an option to check/restore symlinks after unmerge. But at the moment we only check "-e "${EROOT}"/usr/bin/rustc" which is true and return. But we have to check all files from provider list.
There appears to be no way to automatically achieve desired result. (Except pkg_postinst() of dev-lang/rust{,-bin} directly manipulating dev-util/cargo's CONTENTS file in VDB...) In this case, maybe the best solution would be to change soft blocker (!dev-util/cargo) to hard blocker (!!dev-util/cargo). This would force users to uninstall dev-util/cargo before updating dev-lang/rust{,-bin}, and after update, /usr/bin/cargo symlink would be re-created. ewarn message is likely to be missed by many users.
I don't see any relevant comment in my elogs. Here, installing dev-lang/rust-1.30.1-r1 seems to have uninstall dev-util/cargo And no symlink has been installed. Therefore installing firefox/thunderbird failed, see https://bugs.gentoo.org/671260
We cannot really solve this: a) Adding a hard blocker on dev-util/cargo in >=dev-lang/rust{,-bin}-1.30.1 That wouldn't help right know: Because the rust eselect module is only checking for /usr/bin/rustc, it wouldn't detect that /usr/bin/cargo symlink is missing for example. => app-eselect/eselect-rust would need an update first. But adding a hard blocker would also require user interaction prior upgrading rust which is a bad user experience and would break any automatic update process. b) Like said in comment #6, if eselect-rust would check for other required symlinks as well (=including /usr/bin/cargo), we could call it in pkg_ phase of dev-util/cargo to fix symlinks on unmerge. => People would need to upgrade to new dev-util/cargo first to get updated pkg_ functions so that symlinks are getting fixed during migration to >=dev-lang/rust{,-bin}-1.30.1 :/ For now we could only add an ewarn to dev-lang/rust{,-bin}. It is annoying because we would have to show that message all the time because we cannot know in any dev-lang/rust{,-bin}'s pkg_* phase if another package (like dev-util/cargo) will remove a symlink afterwards as part of the same PM run.
(In reply to Thomas Deutschmann from comment #9) > We cannot really solve this: > > a) Adding a hard blocker on dev-util/cargo in >=dev-lang/rust{,-bin}-1.30.1 > > That wouldn't help right know: Because the rust eselect module is only > checking for /usr/bin/rustc, it wouldn't detect that /usr/bin/cargo symlink > is missing for example. If you combine hard blocker AND the code re-setting symlinks from comment #5, then it might work. It will require users to firstly manually uninstall dev-util/cargo, but afterwards, update of dev-lang/rust{,-bin} should create /usr/bin/cargo symlink.
*** Bug 671260 has been marked as a duplicate of this bug. ***
Will it work with disabled cargo use flag and manually installed dev-util/cargo?
(In reply to Oleg from comment #12) > Will it work with disabled cargo use flag and manually installed > dev-util/cargo? You forgot that there isn't a cargo USE flag in >=rust-1.30.1 anymore... so dev-util/cargo is probably going away.
How it going to work with different rust slots?
That's why we have set a soft blocker on dev-util/cargo in >=dev-lang/rust{,-bin}-1.30.1. You cannot have rust-1.30.1 and any previous rust version installed at the same time anymore due to cargo. But please, keep this bug on topic. This is about the missing /usr/bin/cargo symlink after upgrading to >=rust-1.30.1...
*** Bug 671386 has been marked as a duplicate of this bug. ***
*** Bug 671408 has been marked as a duplicate of this bug. ***
*** Bug 671474 has been marked as a duplicate of this bug. ***
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0718dbc84ed51edd184446fc0d9cde7195e25a0 commit c0718dbc84ed51edd184446fc0d9cde7195e25a0 Author: Dirkjan Ochtman <djc@gentoo.org> AuthorDate: 2018-11-19 16:41:47 +0000 Commit: Dirkjan Ochtman <djc@gentoo.org> CommitDate: 2018-11-19 16:42:01 +0000 dev-lang/rust: check reqs, ewarn about cargo symlink Fixes: https://bugs.gentoo.org/626134 Fixes: https://bugs.gentoo.org/626742 Fixes: https://bugs.gentoo.org/663354 Fixes: https://bugs.gentoo.org/671182 Signed-off-by: Dirkjan Ochtman <djc@gentoo.org> Package-Manager: Portage-2.3.51, Repoman-2.3.11 dev-lang/rust/rust-1.30.1-r1.ebuild | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-)
*** Bug 671600 has been marked as a duplicate of this bug. ***
*** Bug 671748 has been marked as a duplicate of this bug. ***
*** Bug 671794 has been marked as a duplicate of this bug. ***
*** Bug 672224 has been marked as a duplicate of this bug. ***
*** Bug 672276 has been marked as a duplicate of this bug. ***
*** Bug 672304 has been marked as a duplicate of this bug. ***
*** Bug 672488 has been marked as a duplicate of this bug. ***
*** Bug 676860 has been marked as a duplicate of this bug. ***
*** Bug 676936 has been marked as a duplicate of this bug. ***
*** Bug 676944 has been marked as a duplicate of this bug. ***
*** Bug 676978 has been marked as a duplicate of this bug. ***
*** Bug 677004 has been marked as a duplicate of this bug. ***
*** Bug 677164 has been marked as a duplicate of this bug. ***
This bug has been marked as fixed. Has the patch been pushed into the portage tree yet? I currently have this bug with cbindgen (Bug 676936) and its been marked as a duplicate of this. This bug was closed over a month ago, so it should be in the tree by now right?
It's fixed. Maybe you need to run "eselect rust set 1"?
(In reply to Pavel Volkov from comment #34) > It's fixed. > Maybe you need to run "eselect rust set 1"? Wow that worked. Thanks.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/eselect-rust.git/commit/?id=47ad9a4eeb74a053d1fbc854fca7d13c96fb1a5b commit 47ad9a4eeb74a053d1fbc854fca7d13c96fb1a5b Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2019-03-11 01:11:16 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2019-03-11 04:54:44 +0000 Add cleanup action Cleanup action will make use of new find_missing_broken_symlinks() function and should be called by ebuild during package removal. If we detect a missing or broken symlink, we will automatically mark latest available version as default (which will basically fix missing or broken symlinks). Bug: https://bugs.gentoo.org/671182 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> rust.eselect.in | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) https://gitweb.gentoo.org/proj/eselect-rust.git/commit/?id=99577f8e98440da176709b6e4b988b40ae42b8d1 commit 99577f8e98440da176709b6e4b988b40ae42b8d1 Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2019-03-11 00:42:52 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2019-03-11 04:54:36 +0000 Add and make use of find_missing_broken_symlinks() dev-lang/rust or dev-lang/rust-bin install more than one binary (program), just checking for "rustc" is not enough. In addition, set of installed programs depends on USE flags. This new (internal) function will check for all provided programs. Bug: https://bugs.gentoo.org/671182 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> rust.eselect.in | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b0a7fbefcd8e03543df2f3b7a2c893596ca79b27 commit b0a7fbefcd8e03543df2f3b7a2c893596ca79b27 Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2019-03-11 06:28:33 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2019-03-11 06:28:55 +0000 dev-util/cargo: rev bump to add pkg_postrm function Required to help upgrading to rust-1.30+. Bug: https://bugs.gentoo.org/671182 Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> dev-util/cargo/{cargo-0.30.0.ebuild => cargo-0.30.0-r1.ebuild} | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=550eb47e987d99529b4a42e592def682047f4cfe commit 550eb47e987d99529b4a42e592def682047f4cfe Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2019-03-11 05:17:36 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2019-03-11 06:28:54 +0000 app-eselect/eselect-rust: bump to v20190311 Bug: https://bugs.gentoo.org/671182 Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> app-eselect/eselect-rust/Manifest | 1 + .../eselect-rust/eselect-rust-20190311.ebuild | 32 ++++++++++++++++++++++ 2 files changed, 33 insertions(+)
*** Bug 684072 has been marked as a duplicate of this bug. ***
*** Bug 688048 has been marked as a duplicate of this bug. ***
*** Bug 688262 has been marked as a duplicate of this bug. ***