Bug 1212145

Summary: python-requests package update fail
Product: Red Hat Enterprise Linux 6 Reporter: Branislav Náter <bnater>
Component: python-requestsAssignee: Matej Stuchlik <mstuchli>
Status: CLOSED ERRATA QA Contact: Branislav Náter <bnater>
Severity: high Docs Contact:
Priority: high    
Version: 6.7CC: dkutalek, icolle, james.antill, jberan, lhh, mburns, mhrivnak, mstuchli, poelstra, rcyriac
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: python-requests-2.6.0-2.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-22 07:43:13 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:

Description Branislav Náter 2015-04-15 16:04:07 UTC
Description of problem:
I'm trying to update python-requests but it fails (see Actual results). After failed update there is weird link in /usr/lib/python2.6/site-packages/ directory (see Additional info).

# ll -d chardet*
drwxr-xr-x. 2 root root 4096 Apr 15 11:07 chardet
lrwxrwxrwx. 1 root root   13 Apr 15 11:08 chardet;552e7ee0 -> ../../chardet

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

How reproducible:

Steps to Reproduce:
1. installed older version of python requests (python-requests-2.3.0-2.el6eng.noarch)
2. yum update python-requests

Actual results:
Downloading Packages:
python-requests-2.6.0-1.el6.noarch.rpm                                                         |  94 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : python-requests-2.6.0-1.el6.noarch                                                                 1/2 
Error unpacking rpm package python-requests-2.6.0-1.el6.noarch
error: unpacking of archive failed on file /usr/lib/python2.6/site-packages/requests/packages/chardet: cpio: rename
python-requests-2.3.0-2.el6eng.noarch was supposed to be removed but is not!
  Verifying  : python-requests-2.3.0-2.el6eng.noarch                                                              1/2 
  Verifying  : python-requests-2.6.0-1.el6.noarch                                                                 2/2 

  python-requests.noarch 0:2.3.0-2.el6eng                     python-requests.noarch 0:2.6.0-1.el6                    


Expected results:

Additional info:
RPM issue is described here: http://lists.repoforge.org/pipermail/rear-users/2011-February/000432.html

Comment 1 Matej Stuchlik 2015-04-15 16:11:24 UTC
The issue here is that we replace a directory with a link during an update which RPM/cpio doesn't handle well, apparently. The links are there because python-requests bundles python-urllib3 and python-chardet, which are deleted during build and replaced with links to the respective system modules.

Comment 2 Matej Stuchlik 2015-04-15 16:13:09 UTC
(In reply to Matej Stuchlik from comment #1)
> The issue here is that we replace a directory with a link during an update
> which RPM/cpio doesn't handle well, apparently.

This also means this bug does not trigger when the packages is either installed anew, or when it is updated from python-requests 1.1.0 (this version does not ship the bundled modules).

Comment 11 errata-xmlrpc 2015-07-22 07:43:13 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.