fix(docs): use --enablerepo for Fedora dnf install instructions - #13268
Bojun-Vvibe wants to merge 2 commits into
Conversation
The previous --repo gh-cli flag restricts dnf to ONLY the gh-cli repository, which causes 'nothing provides git' resolution failures because git lives in the default Fedora repos. Switching to --enablerepo gh-cli additively enables the new repo while keeping the default repos available for dependency resolution.
williammartin
left a comment
There was a problem hiding this comment.
I don't think this gets us anything because our repo file already has enabled=1:
[gh-cli]
name=packages for the GitHub CLI
baseurl=https://cli.github.com/packages/rpm
enabled=1
gpgcheck=1
gpgkey=https://cli.github.com/packages/githubcli-archive-keyring.asc
I think most likely we can just remove the --repo flag altogether since the official repositories are stuck on such an old version. I just don't have a fedora box to verify right now CC @babakks
The repo file installed by config-manager already has enabled=1, so neither --repo nor --enablerepo is necessary. Removing the flag altogether matches the official package repository's enabled-by-default state. Signed-off-by: Bojun Chai <bojunchai@microsoft.com>
|
Thanks @williammartin — good point. Pushed 5ef2645 which drops the |
|
@williammartin good catch — the current diff actually already does exactly that (drops |
|
Yeah, I think we should just close this PR. I've already merged #13444 which fixes the issue with installing dependencies (i.e. git). |
Closes #12808
Repo
cli/cli
Issue
#12808
Root cause
The Fedora install instructions in
docs/install_linux.mdtold users to runsudo dnf install gh --repo gh-cli. The--repo/--repoidflag restrictsdnf to ONLY the listed repository, so dnf cannot resolve
gh's dependencyon
git(which lives in Fedora's default repos), producing"nothing provides git needed by gh-..." errors.
Fix
Replace
--repo gh-cliwith--enablerepo gh-cliin both the DNF5 and DNF4install snippets.
--enablerepoadditively enables the gh-cli repositorywhile keeping the default Fedora repositories available, allowing dnf to
satisfy the
gitdependency. This matches the workaround the reporterconfirmed works.
Regression test
None added: the change is documentation-only (Markdown install instructions
in
docs/install_linux.md); there is no automated test harness in the repothat exercises rendered install commands. A code regression test would not
meaningfully cover this docs string.
Risk
trivial
Verification
skipped: docs-only change; verified by inspecting the diff and dnf flag
semantics (
--repois exclusive,--enablerepois additive). No Go codepaths touched, so
go test/make lintare not relevant to the change.