Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config-manager --add-repo #504

Open
korpe1 opened this issue Sep 20, 2023 · 1 comment
Open

config-manager --add-repo #504

korpe1 opened this issue Sep 20, 2023 · 1 comment
Labels

Comments

@korpe1
Copy link

korpe1 commented Sep 20, 2023

Hi!

The docs says following:
--add-repo=URL
Add (and enable) the repo from the specified file or url. If it has to be added into installroot, combine it with --setopt=reposdir=/<installroot>/etc/yum.repos.d command-line option.”

So, if I understand right, --add-repo can also enable (set value of enabled 1) the spesified repo.
But, when I tested use --add-repo flag to enabling .repo file, it didn’t work 😦

Command sudo dnf config-manager --add-repo /tmp/test.repo just moves test.repo to path /etc/yum.repos.d/.

See: https://discussion.fedoraproject.org/t/how-dnfs-config-manager-plugin-technically-works/88084/16

@pkratoch
Copy link
Contributor

pkratoch commented Dec 5, 2023

Hi, thanks for the report, I confirm the issue.

The --add-repo option doesn't enable the repo when .repo file is given. (It works correctly only when the actual repo is given and a new .repo file is created.) Related code: https://github.com/rpm-software-management/dnf-plugins-core/blob/master/plugins/config_manager.py#L187-L198

The example in documentation ("Download additional.repo and store it in repodir.") also doesn't mention the enabling, so, it should be updated after fixing this issue.

@pkratoch pkratoch removed their assignment Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants