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

copr enable does not respect --installroot #1497

Open
teohhanhui opened this issue May 16, 2024 · 5 comments · May be fixed by #2081
Open

copr enable does not respect --installroot #1497

teohhanhui opened this issue May 16, 2024 · 5 comments · May be fixed by #2081

Comments

@teohhanhui
Copy link

It does with dnf...

@jan-kolarik
Copy link
Member

@praiskup Could you please check this one?

@praiskup praiskup moved this to Needs triage in CPT Kanban Jun 4, 2024
@xsuchy xsuchy moved this from Needs triage to In 3 months in CPT Kanban Jun 5, 2024
@praiskup
Copy link
Member

praiskup commented Jun 6, 2024

This has been added to the CPT's TODO list (3-months schedule)

@kontura
Copy link
Contributor

kontura commented Oct 29, 2024

I believe the issue is a little bit different.
Both dnf5 and old dnf4 setup the copr repository in the host (when used with --installroot) but on subsequent runs with --installroot dnf5 doesn't see it by default.

This is because dnf5 no longer tries to automatically search for configuration file and reposdir in the host if it doesn't find them in the installroot.
There is now --use-host-config, see https://dnf5.readthedocs.io/en/latest/misc/installroot.7.html#installroot-parameter.

Recently we have added a helpful message when no repositories are found in the installroot which I think would help in this case.

So using empty installroot /tmp/test/:

$ dnf5 copr enable rpmsoftwaremanagement/dnf-nightly --installroot=/tmp/test -y
...
$ dnf5 update dnf5 --installroot=/tmp/test
Updating and loading repositories:
Repositories loaded.
Failed to resolve the transaction:
No match for argument: dnf5
No repositories were loaded from the installroot. To use the configuration and repositories of the host system, pass --use-host-config.

(new --use-host-config hint)

Unless we want to change how the copr enable command behaves I think we can close this.

@praiskup
Copy link
Member

Unless we want to change how the copr enable command behaves I think we can close this.

I think this is exactly the thing we want to do - dnf copr should manipulate with repofiles in chroot, not on host. That said, not just enable but list, delete, etc. For DNF5 at least (I thought DNF4 is fine per original report, but haven't tried myself).

@nikromen nikromen moved this from In 3 months to In Progress in CPT Kanban Feb 3, 2025
@nikromen
Copy link

nikromen commented Feb 3, 2025

I am working on this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants