Bug 1265241

Summary: git-review depends on python-request, but RPM missing Requires
Product: [Fedora] Fedora Reporter: Paul Jakma <paul+rhbugz>
Component: dnfAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 23CC: jsilhan, mdomonko, mluscon, packaging-team-maint, paul+rhbugz, pnemade, vmukhame, zaitcev
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-09 10:23:40 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 Paul Jakma 2015-09-22 12:57:24 UTC
Description of problem:

git-review needs the python requests module to function. However, python-requests is not listed as a requirement for git-review, so dnf will install git-review without python-requests, and rpm will too. This leads to an error:

# dnf install git-review
Dependencies resolved.
================================================================================
 Package            Arch           Version                 Repository      Size
================================================================================
Installing:
 git-review         noarch         1.25.0-1.fc23           fedora          75 k

Transaction Summary
================================================================================
Install  1 Package
…
Complete!
$ git review -s
Traceback (most recent call last):
  File "/usr/bin/git-review", line 6, in <module>
    from git_review.cmd import main
  File "/usr/lib/python2.7/site-packages/git_review/cmd.py", line 32, in <module>
    import requests
ImportError: No module named requests
# dnf install python-requests

Dependencies resolved.
================================================================================
 Package         Arch   Version                           Repository       Size
================================================================================
Installing:
 python-chardet  noarch 2.2.1-3.fc23                      fedora          231 k
 python-requests noarch 2.7.0-5.fc23                      updates-testing 101 k
 python-urllib3  noarch 1.10.4-5.20150503gita91975b.fc23  updates-testing 110 k
…
Complete!
$ git review -s
<works>

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

$ rpm -q git-review
git-review-1.25.0-1.fc23.noarch

How reproducible:

100%

Steps to Reproduce:

See above.

Comment 1 Pete Zaitcev 2015-11-24 06:10:22 UTC
The python-requests is listed in the requirements.

[zaitcev@lembas git-review.f23]$ rpm -q --requires git-review-1.25.0-1.fc23.noarch
/usr/bin/python
git
python(abi) = 2.7
python-requests
python-setuptools
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PartialHardlinkSets) <= 4.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1
[zaitcev@lembas git-review.f23]$ 

I suspect a bug in DNF.

Comment 2 Pete Zaitcev 2015-11-24 06:23:40 UTC
I'm reassigning this to the "dnf" component, so that someone knowledgeable
could diagnose how the impossible became possible. If they point out a
problem with the spec, I'll be happy to take this bug back and fix it.

Comment 3 Michal Luscon 2015-12-01 22:38:11 UTC
Could you please provide an output of "dnf repoquery --whatprovides python-requests".

Comment 4 Paul Jakma 2015-12-08 15:00:27 UTC
# dnf repoquery --whatprovides python-requests
Last metadata expiration check performed 2:30:21 ago on Tue Dec  8 12:26:01 2015.
python-requests-0:2.7.0-7.fc23.noarch

However, the problem seems to be gone:

# rpm -q --whatrequires python-requests
git-review-1.25.0-1.fc23.noarch
# dnf remove python-requests
Dependencies resolved.
================================================================================
 Package                Arch          Version              Repository      Size
================================================================================
Removing:
 git-review             noarch        1.25.0-1.fc23        @fedora        214 k
 python-chardet         noarch        2.2.1-3.fc23         @fedora        1.1 M
 python-requests        noarch        2.7.0-7.fc23         @fedora        344 k
 python-urllib3         noarch        1.10.4-6.fc23        @fedora        380 k

Transaction Summary
================================================================================
Remove  4 Packages
…
Complete!
# dnf install git-review
Last metadata expiration check performed 2:32:20 ago on Tue Dec  8 12:26:01 2015.
Dependencies resolved.
================================================================================
 Package                Arch          Version               Repository     Size
================================================================================
Installing:
 git-review             noarch        1.25.0-1.fc23         fedora         75 k
 python-chardet         noarch        2.2.1-3.fc23          fedora        231 k
 python-requests        noarch        2.7.0-7.fc23          fedora        101 k
 python-urllib3         noarch        1.10.4-6.fc23         fedora        110 k

Transaction Summary
================================================================================
Install  4 Packages
Complete!

Exactly what fixed it, I don't know (change in the python-requests package?), but it _seems_ to be fixed AFAICT.

Comment 5 Michal Luscon 2015-12-09 10:23:40 UTC
Ok, let's put it down to some packaging issue. Feel free to reopen if the problem reoccurres.