Bug 1194725

Summary: Every dnf-3 transaction returns "Failed loading plugin: copr"
Product: [Fedora] Fedora Reporter: Dan Mossor [danofsatx] <danofsatx>
Component: dnf-plugins-coreAssignee: Honza Silhan <jsilhan>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 21CC: jsilhan, lnie, mluscon, mmraka, msuchy, pnemade, rholy, tim.lauridsen
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: dnf-plugins-core-0.1.6-3.fc22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-21 19:26:06 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 Dan Mossor [danofsatx] 2015-02-20 16:00:59 UTC
After installing python3-dnf and python3-dnf-plugins-core, every dnf-3 transaction returns an error loading the copr plugin. Due to the design of the core package (not being splittable like extras), copr is included and cannot (easily) be disabled.

Version-Release number of selected component (if applicable):
python3-dnf-0.6.3-2.fc21.noarch
python3-dnf-plugins-core-0.1.4-1.fc21.noarch

How reproducible:
100%

Steps to Reproduce:
1. Install python3-dnf and python3-dnf-plugins-core
2. Run any dnf-3 transaction

Actual results:
"Failed loading plugin: copr"

Expected results:
Clean exit

Additional info:

Similar to #1104088

Feb 21 15:30:32 INFO --- logging initialized ---
Feb 21 15:30:32 DDEBUG timer: config: 7 ms
Feb 21 15:30:32 DEBUG cachedir: /var/cache/dnf/x86_64/21
Feb 21 15:30:32 ERROR Failed loading plugin: copr
Feb 21 15:30:32 SUBDEBUG 
Traceback (most recent call last):
  File "/usr/lib/python3.4/site-packages/dnf/plugin.py", line 124, in import_modules
    module = importlib.import_module(name)
  File "/usr/lib64/python3.4/importlib/__init__.py", line 109, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1129, in _exec
  File "<frozen importlib._bootstrap>", line 1471, in exec_module
  File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
  File "/usr/lib/python3.4/site-packages/dnf-plugins/copr.py", line 29, in <module>
    import requests
ImportError: No module named 'requests'
Feb 21 15:30:32 DEBUG Loaded plugins: download, debuginfo-install, snapper, reposync, noroot, builddep, generate_completion_cache, protected_packages, needs-restarting, Query

Comment 1 Radek Holy 2015-02-20 16:03:15 UTC
This is a bug in Copr plugin. Mirek, can you please take a look?

Comment 2 Michael Mráka 2015-02-23 10:29:42 UTC
In config-manager plugin PR (https://github.com/rpm-software-management/dnf-plugins-core/pull/65) there is urlopen() function in
plugins/dnfpluginscore/lib.py which is both py2/py3 safe and also bears proxy setting in mind. Once this PR is merged, please reuse this function.

Comment 3 Honza Silhan 2015-03-06 11:54:11 UTC
fixed in the upstream.

Comment 4 Fedora Update System 2015-04-09 14:41:01 UTC
dnf-plugins-core-0.1.6-3.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/dnf-plugins-core-0.1.6-3.fc22

Comment 5 lnie 2015-04-10 08:50:32 UTC
dnf-plugins-core-0.1.6-3.fc22 works

Comment 6 Fedora Update System 2015-04-10 18:21:30 UTC
Package dnf-plugins-core-0.1.6-3.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dnf-plugins-core-0.1.6-3.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-5951/dnf-plugins-core-0.1.6-3.fc22
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2015-04-21 19:26:06 UTC
dnf-plugins-core-0.1.6-3.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.