Summary: | dev-lang/swift-5.10.1-r3: doesn't symlink to "swift" and "swiftc" | ||
---|---|---|---|
Product: | GURU | Reporter: | benoit.dufour |
Component: | Package issues | Assignee: | Itai Ferber <itai> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | benoit.dufour |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
benoit.dufour
2025-03-11 20:45:59 UTC
dev-lang/swift-5.10.1-r3 _should_ have called `eselect swift update` here:
> pkg_postinst() {
> # If we're installing the latest version of Swift, then update symlinks to
> # it. (We don't want to call `eselect swift update` unconditionally in case
> # we're installing an older version of Swift, and the user has intentionally
> # selected a version other than the latest.)
> if ! has_version ">${CATEGORY}/${P}"; then
> eselect swift update
> fi
> }
If you unset any Swift version via eselect and run `eselect swift update` manually, does it correctly set a version?
Yes. It seems like it does. tux ~ # eselect swift list Available Swift versions: [1] swift-5.10.1 * tux ~ # eselect swift unset tux ~ # eselect swift list Available Swift versions: [1] swift-5.10.1 tux ~ # eselect swift update tux ~ # eselect swift list Available Swift versions: [1] swift-5.10.1 * Thanks for double-checking! It seems like something may have tripped up the condition, then? Not sure how, but I'll see if I can manage to repro. (I've extensively tested first-time installs in clean environments and haven't seen this happen, but I'll see what I can find out.) It happened on the two computers I tested it on. First on the laptop from 2020, and then on the tower from 2010-12. I was able to reproduce this myself now in a container. Will try to track down the failure. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=fdc4461cb862f6605de2331edad93c92084dad67 commit fdc4461cb862f6605de2331edad93c92084dad67 Author: Itai Ferber <itai@itaiferber.net> AuthorDate: 2025-03-26 19:43:03 +0000 Commit: Itai Ferber <itai@itaiferber.net> CommitDate: 2025-03-26 19:46:02 +0000 dev-lang/swift: fix symlinking on install On `pkg_postinst`, `has_version` wasn't returning the expected value in order to symlink Swift on first install; instead, we can use `eselect swift show` itself to be able to tell whether we're eligible to update the symlinks. Closes: https://bugs.gentoo.org/951175 Signed-off-by: Itai Ferber <itai@itaiferber.net> dev-lang/swift/swift-5.10.1-r4.ebuild | 28 ++++++++++++++++++++-------- dev-lang/swift/swift-6.0.3-r1.ebuild | 28 ++++++++++++++++++++-------- 2 files changed, 40 insertions(+), 16 deletions(-) |