Bug 1644563 - backtrace when trying to disable old style Copr repo filename
Summary: backtrace when trying to disable old style Copr repo filename
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf-plugins-core
Version: 29
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1636461 1645771 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-10-31 07:16 UTC by Jens Petersen
Modified: 2019-11-12 14:20 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-12 14:20:41 UTC


Attachments (Terms of Use)

Description Jens Petersen 2018-10-31 07:16:04 UTC
Description of problem:
Not quite sure what is going on, but
`dnf copr disable fidencio/sssd-kcm-issues`
gives me a backtrace.

If I understand correctly after playing with dnf copr
The /etc/yum.repos.d/files are now named like:
`_copr:copr.fedorainfracloud.org:petersen:stack.repo`
vs old style names: `_copr_petersen-stack.repo`.

Version-Release number of selected component (if applicable):
dnf-plugins-core-4.0.0-2.fc29

How reproducible:
100%

Steps to Reproduce:
1. Try to disable old style copr filename repo

Actual results:
$ sudo dnf copr disable fidencio/sssd-kcm-issues
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/main.py", line 179, in user_main
    errcode = main(args)
  File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 64, in main
    return _main(base, args, cli_class, option_parser_class)
  File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 99, in _main
    return cli_run(cli, base)
  File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 115, in cli_run
    cli.run()
  File "/usr/lib/python3.7/site-packages/dnf/cli/cli.py", line 1055, in run
    return self.command.run()
  File "/usr/lib/python3.7/site-packages/dnf-plugins/copr.py", line 264, in run
    self._disable_repo(copr_username, copr_projectname)
  File "/usr/lib/python3.7/site-packages/dnf-plugins/copr.py", line 504, in _disable_repo
    repo = self._get_copr_repo(copr_username, copr_projectname)
  File "/usr/lib/python3.7/site-packages/dnf-plugins/copr.py", line 483, in _get_copr_repo
    copr_hostname = file_name.rsplit(':', 2)[0].split(':', 1)[1]
IndexError: list index out of range


Expected results:
No backtrace

Additional info:
I suppose I probably have to setup all the copr repos afresh.
Do you plan to support old style files in the interim?

Comment 1 Miroslav Suchý 2018-11-05 14:42:50 UTC
*** Bug 1645771 has been marked as a duplicate of this bug. ***

Comment 2 Miroslav Suchý 2018-11-26 12:46:33 UTC
*** Bug 1636461 has been marked as a duplicate of this bug. ***

Comment 3 Miroslav Suchý 2018-11-26 12:47:53 UTC
This has been fixed in
  https://github.com/rpm-software-management/dnf-plugins-core/pull/302

* de236b2 copr: fix disabling repos with old filenames and repo IDs (RhBug:1644563)

It is going to be in the next version of dnf-plugins-core (something higher than 4.0.0)

Comment 4 Ben Cotton 2019-10-31 20:27:51 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '29'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 29 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.


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