Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 926104 - dev-build/bazelisk should optionally install itself as bazel
Summary: dev-build/bazelisk should optionally install itself as bazel
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Maciej Barć
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-03 17:05 UTC by kit
Modified: 2024-03-04 21:58 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 kit 2024-03-03 17:05:26 UTC
bazelisk suggests to install itself as bazel on PATH, its README mentions that brew (macos) and choco (windows) packages install both bazelisk and bazel binaries.

There should similarly be a way to have dev-build/bazelisk install a bazel binary, maybe as a symlink behind a USE flag.

As a bazel user it would be convenient to not have to create that symlink manually.
Comment 1 Maciej Barć gentoo-dev 2024-03-04 08:43:54 UTC
I wonder what that USE flag should be, and if "symlink" is enough, it looks nice but is it descriptive enough?
Comment 2 kit 2024-03-04 19:30:11 UTC
I'm no gentoo developer but to me it should be something like "bazel-symlink".

Looking at some of the other packages that install symlinks to binaries, there are a few that do it this way:
- app-misc/jpipe has "jpp-symlink" and "jp-symlink"
- app-text/pandoc-bin has "pandoc-symlink"
- sys-cluster/k3s has "kubectl-symlink"

I only found one package that uses just "symlink": net-analyzer/nmap.

There are also a few that don't include the "-symlink" suffix like
- app-editors/neovim has "nvimpager"
- sys-fs/ntfs3g has "mount-ntfs"
- sys-apps/systemd has "resolvconf"

And there are packages that install multiple symlinks with a single flag, I'm going to ignore those.

I probably missed a few, but it looks like when a package installs a symlink to a binary it generally includes the name of the binary in the USE flag.
Comment 3 Maciej Barć gentoo-dev 2024-03-04 19:32:40 UTC
> I'm no gentoo developer but to me it should be something like "bazel-symlink".

I literally made this commit but is not pushed yet :)

> There are also a few that don't include the "-symlink" suffix like

Also some "kubectl-symlink" USE flags.
Comment 4 Larry the Git Cow gentoo-dev 2024-03-04 21:58:11 UTC
The bug has been closed via the following commit(s):

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

commit 6e4fb2b43339fa5df77a346fb71235b30844ab58
Author:     Maciej Barć <xgqt@gentoo.org>
AuthorDate: 2024-03-04 17:08:49 +0000
Commit:     Maciej Barć <xgqt@gentoo.org>
CommitDate: 2024-03-04 21:56:44 +0000

    dev-build/bazelisk: support bazel-symlink
    
    Closes: https://bugs.gentoo.org/926104
    Signed-off-by: Maciej Barć <xgqt@gentoo.org>

 .../bazelisk/{bazelisk-1.19.0.ebuild => bazelisk-1.19.0-r1.ebuild} | 5 +++++
 dev-build/bazelisk/metadata.xml                                    | 7 +++++--
 2 files changed, 10 insertions(+), 2 deletions(-)