Bug 2175427

Summary: When using dnf copr remove, be smarter in detecting repository author from repository name, and offer choices hints if needed
Product: [Fedora] Fedora Reporter: Jean-François Fortin Tam <nekohayo>
Component: dnf-plugins-coreAssignee: Copr Team <copr-team>
Status: CLOSED DEFERRED QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 39CC: daniel.mach, jmracek, mblaha, msuchy, packaging-team-maint, pkratoch, praiskup, rpm-software-management, vmukhame
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-08-25 09:59:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jean-François Fortin Tam 2023-03-04 20:19:59 UTC
If I were to do just "dnf copr remove gnome-info-collect", I would get these:

 Error: use format `copr_username/copr_projectname` to reference copr project
 Error: bad copr project format

...so in theory I needed to use "dnf copr remove vstanek/gnome-info-collect"

...however, it would be nice if DNF was more helpful to the user by either realizing that there is only one COPR matching this name on my system even if I don't specify the author's name (and asking if that's the one I want to delete), or listing potential matches with a "Did you mean one of these repositories?" kind of message...

Comment 1 Fedora Release Engineering 2023-08-16 08:14:55 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.

Comment 2 Miroslav Suchý 2023-08-25 09:59:43 UTC
1) As this is feature request, the change will not happen in DNF4 and in current dnf-plugins-core. The development is now focused on DNF5 and copr plugin is complete rewrite there (because python -> C++)
https://github.com/rpm-software-management/dnf5/tree/main/dnf5-plugins/copr_plugin

2) I am not persuaded that we should try to accept the parameter even it it match only one repo. I think the full classification is the correct way to avoid mistakes. However giving the hint to user is good thing.

3) Being honest - this would be at the bottom of our priorities and will not happen in near 2 years. And may be deferred and deferred infinitely. So I will rather close is right now as we will not have capacity for this.

Though, we will happily review and accept pull-request if you want to implement it:
https://github.com/rpm-software-management/dnf5/tree/main/dnf5-plugins/copr_plugin