Bug 1157204

Summary: [abrt] dnf: base.py:118:_add_repo_to_sack:AssertionError: Can not load Yum repo.
Product: [Fedora] Fedora Reporter: Andrew Merts <redhat>
Component: dnfAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: akozumpl, jsilhan, mluscon, packaging-team-maint, pnemade, redhat, rholy, tim.lauridsen
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/bc9ca68a1ff39e53ecaa62aba81f8739e3309b66
Whiteboard: abrt_hash:318ffb0c9e52e1479c817818e8211ed7415d8c57
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-11-21 15:25:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
File: environ none

Description Andrew Merts 2014-10-26 04:04:08 UTC
Description of problem:
Recent Fedora 21 install, haven't changed yum config or repos. dnf install anything causes a crash.

Version-Release number of selected component:
dnf-0.6.2-1.fc21

Additional info:
reporter:       libreport-2.3.0
cmdline:        /usr/bin/python -OO /bin/dnf install java
executable:     /bin/dnf
kernel:         3.17.1-303.fc21.x86_64
runlevel:       N 5
type:           Python
uid:            0

Truncated backtrace:
base.py:118:_add_repo_to_sack:AssertionError: Can not load Yum repo.

Traceback (most recent call last):
  File "/bin/dnf", line 36, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 182, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 84, in main
    return _main(base, args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 134, in _main
    cli.run()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1085, in run
    self._process_demands()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 812, in _process_demands
    load_available_repos=lar)
  File "/usr/lib/python2.7/site-packages/dnf/base.py", line 221, in fill_sack
    self._add_repo_to_sack(r.id)
  File "/usr/lib/python2.7/site-packages/dnf/base.py", line 118, in _add_repo_to_sack
    load_presto=repo.deltarpm, load_updateinfo=True)
AssertionError: Can not load Yum repo.

Local variables in innermost frame:
repo: <Repo fedora>
hrepo: <_hawkey.Repo object at 0x7ff0f29ab048>
self: <dnf.cli.cli.BaseCli object at 0x7ff0f29d57d0>
name: u'fedora'

Comment 1 Andrew Merts 2014-10-26 04:04:11 UTC
Created attachment 950732 [details]
File: backtrace

Comment 2 Andrew Merts 2014-10-26 04:04:12 UTC
Created attachment 950733 [details]
File: environ

Comment 3 Andrew Merts 2014-10-26 04:35:15 UTC
After manually deleting /var/cache/dnf and trying again dnf segfaults now. Didn't open a separate bug, https://retrace.fedoraproject.org/faf/reports/466412/.

Comment 4 Honza Silhan 2014-10-27 12:53:12 UTC
Thanks for the report. I couldn't reproduce these cases. Once you encounter "Can not load Yum repo." Assertion again, backup "/var/cache/dnf" and upload it as an attachment, please.

Do you have added any SPECIAL third-party repository?

Comment 5 Andrew Merts 2014-11-21 15:25:54 UTC
I still haven't run into this bug again, the only thing about the OS that wasn't stock Fedora 21 was just dnf. Also, when dnf was segfaulting I must have forgotten to mention that I ran rpm -Va and everything looked clean. Other than the backtraces unfortunately I have nothing else to provide.