Bug 1059704

Summary: [api] dnf.base.Base.read_comps() fails when there's no comps
Product: [Fedora] Fedora Reporter: Daniel Mach <dmach>
Component: dnfAssignee: Honza Silhan <jsilhan>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: akozumpl, packaging-team-maint, pnemade, rholy
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-0.4.17-1.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-08 03:35:10 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 Daniel Mach 2014-01-30 12:40:40 UTC
Reproducer:
import dnf.base

# 1st problem - dnf.exceptions.CompsError
base = dnf.Base()
base.fill_sack(load_system_repo=True, load_available_repos=False)
base.read_comps()

# 2nd problem - AttributeError: 'NoneType' object has no attribute 'comps_fn'
base = dnf.Base()
base.read_all_repos()
base.fill_sack(load_system_repo=True, load_available_repos=False)
base.read_comps()

Not sure if it's expected or not...
(maybe I'm just using DNF internals incorrectly...)

Comment 1 Ales Kozumplik 2014-01-30 13:08:24 UTC
will take a look, thanks.

Comment 2 Ales Kozumplik 2014-02-03 17:48:07 UTC
Jan please take a look. In case there's no comps data the comps object should just end up be empty and the code should not throw weird exceptions.

Comment 3 Honza Silhan 2014-02-27 15:33:31 UTC
Fixed in the upstream.

Comment 4 Fedora Update System 2014-03-05 12:57:10 UTC
dnf-0.4.17-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/dnf-0.4.17-1.fc20

Comment 5 Fedora Update System 2014-03-06 08:13:48 UTC
Package dnf-0.4.17-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dnf-0.4.17-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-3465/dnf-0.4.17-1.fc20
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2014-03-08 03:35:10 UTC
dnf-0.4.17-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.