Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1693551 - Problem with dnf copr disable command
Summary: Problem with dnf copr disable command
Status: POST
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf-plugins-core
Version: 29
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Jaroslav Rohel
QA Contact: Fedora Extras Quality Assurance
: 1694872 1696851 1697178 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2019-03-28 07:15 UTC by Peng Wu
Modified: 2019-04-08 05:35 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed:

Attachments (Terms of Use)

Description Peng Wu 2019-03-28 07:15:02 UTC
Description of problem:

I tried to use dnf copr disable command, but it failed.

I enable dnf copr by using:
# dnf copr enable pwu/pango

Version-Release number of selected component (if applicable):

How reproducible:
Try to enable the Fedora copr, then disable the copr.

Steps to Reproduce:
1. Enable the Fedora copr by using dnf copr enable pwu/pango
2. Disable the Fedora copr by using dnf copr disable pwu/pango

Actual results:
Some Traceback printed.

Expected results:
The Fedora copr repo is disabled.

Additional info:

Comment 1 Peng Wu 2019-03-28 07:23:24 UTC
Here are the Traceback log:

# dnf copr disable pwu/pango
Traceback (most recent call last):
  File "/usr/bin/dnf", line 58, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python3.7/site-packages/dnf/cli/", line 192, in user_main
    errcode = main(args)
  File "/usr/lib/python3.7/site-packages/dnf/cli/", line 64, in main
    return _main(base, args, cli_class, option_parser_class)
  File "/usr/lib/python3.7/site-packages/dnf/cli/", line 99, in _main
    return cli_run(cli, base)
  File "/usr/lib/python3.7/site-packages/dnf/cli/", line 115, in cli_run
  File "/usr/lib/python3.7/site-packages/dnf/cli/", line 1128, in run
  File "/usr/lib/python3.7/site-packages/dnf-plugins/", line 266, in run
    self._disable_repo(copr_username, copr_projectname)
  File "/usr/lib/python3.7/site-packages/dnf-plugins/", line 521, in _disable_repo
    self.base.conf.substitutions, {"enabled": 0})
  File "/usr/lib/python3.7/site-packages/dnf/conf/", line 198, in write_raw_configfile
    parser.setValue(section_id, name, value)
  File "/usr/lib64/python3.7/site-packages/libdnf/", line 1855, in setValue
    return _conf.ConfigParser_setValue(self, *args)
NotImplementedError: Wrong number or type of arguments for overloaded function 'ConfigParser_setValue'.
  Possible C/C++ prototypes are:
    libdnf::ConfigParser::setValue(std::string const &,std::string const &,std::string const &,std::string const &)
    libdnf::ConfigParser::setValue(std::string const &,std::string const &,std::string const &)
    libdnf::ConfigParser::setValue(std::string const &,std::string &&,std::string &&,std::string &&)
    libdnf::ConfigParser::setValue(std::string const &,std::string &&,std::string &&)

Additional info:

Maybe use the following code helps?
self.base.conf.substitutions, {"enabled": "0"})

Comment 3 Marek Blaha 2019-04-03 05:16:52 UTC
*** Bug 1694872 has been marked as a duplicate of this bug. ***

Comment 4 Marek Blaha 2019-04-08 05:30:22 UTC
*** Bug 1696851 has been marked as a duplicate of this bug. ***

Comment 5 Marek Blaha 2019-04-08 05:35:41 UTC
*** Bug 1697178 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.